Zero Playground
Read DocsWrite, run, and share code snippets — no setup required.
Try Zero in the browser
Zero is the new systems programming language from Vercel Labs, first released in May 2026. On the surface it looks Rust-shaped — pub fun, let mut, ->, generic brackets — but the design goal is unusual: every part of the toolchain is meant to be read, edited, and repaired by AI agents as comfortably as by humans. Diagnostics ship as structured JSON with stable error codes, the compiler can emit typed repair plans, and binaries land under 10 KiB. The playground gives you a clean editor to poke at the language without installing anything.
The most distinctive idea in Zero is capability-based I/O. There are no implicit globals and no ambient stdout — a function that wants to write to the terminal has to accept a World parameter and call world.out.write(...). Errors propagate with raises and check instead of exceptions or panics, and optional values use .has / .value instead of null. Press Run and the editor compiles your source server-side and shows the output. Stdin isn't wired up yet because Zero v0.1.3 hasn't shipped a stdin API — use std.args via the Args panel instead.
Why Zero is interesting
- Capability-based I/O: every side effect (stdout, files, network) flows through a
Worldparameter, so a function's signature tells you what it can touch. No hidden globals, no implicit allocator, no surprise async. - Agent-first toolchain:
zeroemits stable JSON diagnostics,zero fix --plan --jsonproduces typed repair plans, and every CLI subcommand takes--jsonso agents can pipe output around instead of regex-parsing it. - Tiny native binaries, often under 10 KiB. The compiler uses direct emitters for ELF, Mach-O, PE, and WebAssembly, so there's no LLVM dependency to drag along.
- Familiar syntax, sharper safety: Rust-like on the page, but no panic-on-null, no implicit GC, and no hidden control flow. Errors are just values you propagate with
check.
Things to try in the Zero playground
- Print something via
world.out.writeand watch how theraisesannotation forces you to handle the error path withcheck. That's Zero's whole idiom for safety without exceptions, in one tiny example. - Read a command-line argument with
std.args.get(N)and unwrap the optional with.has/.value. Edit values in the Args panel below the editor — they're passed to your program on Run, exactly like real argv. - Write a small
funthat returns aString, call it frommain, and watch the types thread through. Zero infers generics more aggressively than Rust, so most call sites need no annotations at all.
Frequently asked questions about Zero
What is the Zero programming language?
--json, and a separate zero fix --plan mode produces typed repair plans agents can apply directly. Syntactically it sits somewhere between Rust and Zig. The headline idea is capability-based I/O via a World parameter.Do I need to install the Zero compiler to use this playground?
zero toolchain server-side in a sandboxed container, so you write code in the browser and press Run. The compiler version is pinned (currently v0.1.3) and the sandbox is the same for every run. If you want to develop locally too, the Zero project publishes prebuilt binaries on its GitHub releases page.Why doesn't the Zero playground have a stdin input box?
World parameter (world.out, world.err), plus std.args for command-line arguments and std.env for environment variables. Until Vercel Labs ships a stdin capability, use the Args panel below the editor — that's how you feed input into your program.What is the World capability and why does main take one?
World value and call methods on it (world.out.write, world.err.write, and so on). That turns the signature into an honest declaration of side effects — if a function doesn't take World, it provably can't touch the outside world. main gets one because the runtime is what grants the initial capability.What do raises and check mean?
raises (optionally listing the specific error names), and callers write check expr to propagate the failure up the stack. Think of it as Rust's ? operator with named error types: failures are values, not control-flow surprises.