v0.3.0-dev Now with CBC-MN Scheduler

Janus Async Superior

A systems programming language that eliminates function coloring, provides preemptive scheduling, and guarantees structured concurrency — all with zero-cost abstractions.

0Function Colors
Sovereignty
3Profiles
example.janus
// Janus: Async without the color
func main() with ctx where ctx.has(.io) do
    // Structured concurrency - no orphans
    using nursery := Nursery.new() do
        nursery.spawn(fetch_user(id: 42))
        nursery.spawn(fetch_orders(user_id: 42))
    end  // Both tasks complete before continuing
    
    // Pipeline operator for clean data flow
    users 
        |> filter(active: true)
        |> map(u => u.name)
        |> join(", ")
        |> print()
end

Why Janus Wins

Direct comparison with Zig 0.16 and Rust (tokio). No marketing fluff — just facts.

Function Coloring

Janus eliminates the async/await color problem entirely. No more "red functions" vs "blue functions."

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

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.

Language Features

Built for systems programming with modern ergonomics and bulletproof correctness.

Zero-Cost Async

No runtime overhead. No function coloring. Async is just another profile, not a different world.

PerformanceZero-cost

Capability Security

Explicit capabilities for I/O, spawning, and resource budgets. No ambient authority.

SecurityDoS-proof

Structured Concurrency

Nurseries ensure no orphaned tasks. Parent always waits for children. No leaks.

CorrectnessSafety

Budget Scheduling

Deterministic preemption based on operation budgets, not time slices. Reproducible execution.

DeterministicFair

Profile System

Three profiles: :core for embedded, :service for backends, :sovereign for distributed systems.

FlexibleScalable

Memory Safety

Ownership and affinity system without the borrow checker fights. Linear types where you need them.

SafeExpressive

Try Janus

Interactive playground. Explore the syntax and see how Janus code looks in action.

Examples

Hello Worldjanus
// Janus Hello World in :core profile
profile :core

func main() do
    print("Hello, World!")
end
Output
Click "Run Code" to see output...

Profile System

Janus adapts to your needs. Three profiles, one language. Scale from microcontrollers to distributed systems.

Core Profile

Minimal runtime, maximum control. For embedded systems, kernels, and bare-metal programming.

Features

  • No allocator required
  • No async runtime
  • Direct memory control
  • Interrupt handlers
  • Static linking only

Use Cases

EmbeddedKernelsBootloadersMicrocontrollers
main.janus
profile :core

// No heap allocator - stack only
func main() do
    let buffer: [u8; 1024] = undefined
    let reader = UartReader.new(&buffer)
    
    loop {
        let byte = reader.read()
        match byte {
            Some(b) => handle_byte(b),
            None => break
        }
    }
end

Structured Concurrency

See how Janus guarantees no orphaned tasks with nursery-based spawning.

Visual Demo

Nursery
P
Parent
A
Task A
B
Task B
Nursery CreatedStep 1 of 5
Parent creates a nursery — a scope for structured concurrency.
using nursery := Nursery.new() do
    // Tasks spawned here

Key Points

  • ○ Nursery guarantees no orphans
  • ○ Budget-based preemptive scheduling
  • ○ Parent waits for all children

Code Examples

Explore Janus syntax and features through practical examples.

Variables & Types

// Immutable by default
let name = "Janus"           // Type inferred: String
let version: f64 = 0.3       // Explicit type

// Mutable variables
var counter = 0
counter += 1

// Constants at compile time
const MAX_SIZE = 1024

Functions

// Function with return type
func add(a: i64, b: i64) -> i64 do
    return a + b
end

// Expression-based (no return needed)
func multiply(a: i64, b: i64) -> i64 do
    a * b  // Last expression is returned
end

// Generic function
func identity<T>(value: T) -> T do
    value
end

Control Flow

// If expressions (always return a value)
let max = if a > b then a else b

// Loops
var i = 0
while i < 10 do
    print("Iteration {i}")
    i += 1
end

// For loops
for item in items do
    process(item)
end