Project layout
Minimal project:
my-app/ zz.toml src/main.zz tests/ bench/zz.toml:
[package]name = "my-app"version = "0.1.0"
[test]jobs = 4Entry point
Section titled “Entry point”zz build / zz run with no file uses src/main.zz (then main.zz).
Override with [package] entry = "src/cli.zz" (must stay inside the package).
Outputs go to <root>/bin/<name> for projects, ./<stem> for standalone files.
Sidecars (app.c, build.sh, build.bat) sit next to the binary for manual rebuilds.
Imports resolve by tree, not CWD
Section titled “Imports resolve by tree, not CWD”import std.mathimport std.strimport app.math // <root>/src/math.zz as math.*import app.utils.helpers as hPrecedence: std > package (app.*) > registry dep > relative file.
- and _ spellings agree (my-app is my_app).
Tests, benches, assets
Section titled “Tests, benches, assets”- Tests:
zz testuses./tests/when it holds.zzfiles, else.. - Benches:
zz benchuses./bench/when present, else.. - Static assets:
zz build --embed ./assets+fs.embedfs()at runtime. - Deps:
vendor/+zz.lock, managed byzz install. See Packages.
Useful commands
Section titled “Useful commands”zz check src/ # fast, cachedzz fmt src/zz testzz benchzz clean # bin/, build/, src/bin/zz clean --deps # + vendor/ + zz.lock