Janus

Async Superior to Rust and Zig

Property: Function coloring

Janus (CBC-MN)Zig 0.16Rust (tokio)
ColoringNone — async is profile-gated"1.5 colors" — Io paramHard-colored

Property: Preemptive yielding

Janus (CBC-MN)Zig 0.16Rust (tokio)
YieldBudget-based auto-yieldCooperative onlyCooperative only

Property: DoS immunity

Janus (CBC-MN)Zig 0.16Rust (tokio)
Protection✓ Built-in — capability-gated✗ None✗ None

Property: Structured concurrency

Janus (CBC-MN)Zig 0.16Rust (tokio)
Model✓ Nurseries — no orphansGroup/Select existtokio::spawn breaks structure

Property: Cancellation

Janus (CBC-MN)Zig 0.16Rust (tokio)
MethodCooperative + transitiveFirst-class cancel(io)Drop-based — footgun

Property: Capability gating

Janus (CBC-MN)Zig 0.16Rust (tokio)
Gating✓ CapSpawn, CapBudget, CapChannel✗ None✗ None

Property: Profile system

Janus (CBC-MN)Zig 0.16Rust (tokio)
Profiles✓ :core, :service, :sovereignN/AN/A

Where Janus Is Genuinely Superior

  1. Budget-based scheduling — Neither Zig nor Rust have this. Your scheduler yields based on operation counts, not time — deterministic + reproducible.
  2. Capability-gated spawning — Language-level DoS immunity. No other systems language has this.
  3. Nurseries as ONLY model — Zero orphan tasks by construction.
  4. Profile-aware concurrency — :core students literally cannot use concurrency.

Where to Watch Out

  1. Zig 0.16's async vs concurrent distinction is architecturally elegant.
  2. Zig's Io.Evented will use io_uring — faster than current context-switching.
  3. Rust is battle-tested at massive scale. Janus needs production testing.

Action Items

ItemPriority
Zig "std/Io" native accessP0
CBC-MN scheduler compat with Zig 0.16P0
SPEC-020 executor: add Io.ThreadedP1
ArrayList + .init() migration (339 files)P0

Resources

GitHub Specs