Janus
Async Superior to Rust and Zig
Property: Function coloring
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Coloring | None — async is profile-gated | "1.5 colors" — Io param | Hard-colored |
Property: Preemptive yielding
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Yield | Budget-based auto-yield | Cooperative only | Cooperative only |
Property: DoS immunity
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Protection | ✓ Built-in — capability-gated | ✗ None | ✗ None |
Property: Structured concurrency
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Model | ✓ Nurseries — no orphans | Group/Select exist | tokio::spawn breaks structure |
Property: Cancellation
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Method | Cooperative + transitive | First-class cancel(io) | Drop-based — footgun |
Property: Capability gating
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Gating | ✓ CapSpawn, CapBudget, CapChannel | ✗ None | ✗ None |
Property: Profile system
| Janus (CBC-MN) | Zig 0.16 | Rust (tokio) | |
|---|---|---|---|
| Profiles | ✓ :core, :service, :sovereign | N/A | N/A |
Where Janus Is Genuinely Superior
- Budget-based scheduling — Neither Zig nor Rust have this. Your scheduler yields based on operation counts, not time — deterministic + reproducible.
- Capability-gated spawning — Language-level DoS immunity. No other systems language has this.
- Nurseries as ONLY model — Zero orphan tasks by construction.
- Profile-aware concurrency — :core students literally cannot use concurrency.
Where to Watch Out
- Zig 0.16's async vs concurrent distinction is architecturally elegant.
- Zig's Io.Evented will use io_uring — faster than current context-switching.
- Rust is battle-tested at massive scale. Janus needs production testing.
Action Items
| Item | Priority |
|---|---|
| Zig "std/Io" native access | P0 |
| CBC-MN scheduler compat with Zig 0.16 | P0 |
| SPEC-020 executor: add Io.Threaded | P1 |
| ArrayList + .init() migration (339 files) | P0 |