Building From Source
Use this path when you want to try Zero from a checkout or work on the compiler.
npm install
make -C native/zero-c
bin/zero --versionmake builds the local compiler into .zero/bin/zero. The repository wrapper
bin/zero uses that local build.
Quick Command Loop
bin/zero check examples/hello.0
bin/zero build --emit exe --target linux-musl-x64 examples/add.0 --out .zero/out/add
./.zero/out/addInspect Code
Inspect package/module structure:
bin/zero graph --json examples/systems-packageInspect artifact size metadata:
bin/zero size --json examples/point.0List known targets:
bin/zero targetsExplain diagnostics and inspect repair plans without editing files:
bin/zero explain TAR002
bin/zero fix --plan --json conformance/native/fail/mem-copy-immutable-dst.0Native Targets
The compiler currently supports direct executable output for the documented native target names:
darwin-arm64darwin-x64linux-arm64linux-musl-arm64linux-musl-x64linux-x64win32-arm64.exewin32-x64.exe
bin/zero build --emit exe --target linux-musl-x64 examples/add.0 --out .zero/out/add-linux-musl
bin/zero build --emit exe --target win32-x64.exe examples/hello.0 --out .zero/out/hello-win32Unsupported target or feature requests report diagnostics instead of silently choosing another backend.
Web And Wasm
Build a small WebAssembly artifact:
bin/zero build --emit wasm --target wasm32-web examples/direct-wasm-add.0 --out .zero/out/direct-wasm-addInspect a web route manifest:
bin/zero routes --json examples/web/helloThe web route support is an early local-runtime surface. Use it to inspect route metadata and browser-worker/WASI facts, not as a hosted deployment promise.
Current Language Subset
The compiler supports the command-line language subset used by the examples:
- multi-file manifest packages
- functions and typed parameters
- typed
letandlet mut - fixed array literals and assignment
defermatchcheck,return,if,else, andwhile- calls and member calls
- strings, numbers, booleans, and binary operators
shapeandextern shape- shape literals and direct field access
enum- payload and no-payload
choicetags owned<T>,Span<T>,ref<T>, andmutref<T>checks for the documented subset- early
std.mem,std.codec,std.parse,std.fs, and platform helper surfaces
Validate A Checkout
npm run docs:test
npm run conformance
npm run native:test
npm run command-contractsRun local benchmark smoke coverage:
npm run benchThe TypeScript code in this repository is support tooling for docs, tests, benchmarks, and editor integration. It is not a separate TypeScript compiler implementation.