Experimental · pure · typed

Data at rest. Computation in motion.

Zutai is a two-mode language: an inert data format and a pure, lazy, typed language that transforms it — carrying types from source all the way to native code.

healthy.zt — checked, then compiled
Service :: type {  name : Text;  errors : Int;  enabled : Bool;}; healthy :: Service -> Bool  = service =>    service.enabled && service.errors == 0; ready :: List Service -> Int  = services =>    length (filter healthy services);

01 — Two modes

One syntax. Two jobs.

Records, lists, tuples, and atoms are written the same way in both modes. Data files never evaluate; computation files always do.

General mode

Transform, with proof.

Pure functions, exhaustive unions, effects with visible authority, and a typed path to LLVM. Every case is checked before anything runs.

.zt — computation
Tier :: type { #edge; #core; #batch; }; budget :: Tier -> Int  = tier => match tier {      | #edge  => 50;      | #core  => 200;      | #batch => 1000;    };

02 — See it run

The hero snippet, live in your browser.

This roster runs the very code beside it — the same typed Service, healthy, and ready functions the compiler checks. Deploy a service, pause it, or log an error, and the readiness rollup recomputes from those functions, evaluated in your browser as you click.

roster.zt — evaluated live
healthy :: Service -> Bool  = svc =>    svc.enabled && svc.errors == 0; ready :: List Service -> Int  = svcs =>    length (filter healthy svcs);
2of4ready
  • auth-coreready · 0 errors
  • payments-edgeready · 0 errors
  • search-indexerroring · 2 errors
  • batch-archiverpaused · 0 errors

03 — Why Zutai

Nothing ambient. Nothing hidden.

Four commitments the language keeps on every program.

01

Two modes, one language

Inert .zti data and pure .zt computation share one syntax. Data stays literal; transformation stays explicit and separate.

02

Types all the way down

Source elaborates through THIR and TLC to a typed native path. The compiler never loses the types you wrote.

03

Effects show authority

Filesystem, network, and other runtime work are typed and handled at a boundary you can see — no ambient side effects.

04

Refusal beats fiction

Incomplete typed IR does not run. A wrong value is worse than no value, so the evaluator refuses rather than guess.

04 — Compiler

Every step stays visible.

General mode lowers through a chain of typed IRs — each one inspectable — before it reaches native code.

Source.zt
HIRnames + shape
THIRtypes + diagnostics
TLCexplicit polymorphism
Dataflowsharing + recursion
ANFnamed lowering
SSAblocks + phis
LLVMnative output

05 — Get started

Check it, run it, compile it.

Clone the workspace and drive the compiler from one CLI. Programs are type-checked before they ever evaluate.

cargo run -p zutai-cli -- check src/app.zt

Type-check and report diagnostics

cargo run -p zutai-cli -- run examples/service_health.zt

Evaluate a program and print its result

cargo run -p zutai-cli -- repl

Explore expressions interactively

cargo run -p zutai-cli -- compile src/app.zt --emit bin

Lower all the way to a native binary