Start With Graph Examples
The Zerolang examples directory is the fastest way to understand what works today. Most
examples are checked-in .graph inputs or graph-first packages with
zero.graph stores. Sibling .0 files, when present, are human-readable
projections for review.
Expected Usage
Learning Order
Small programs:
examples/hello.graphexamples/add.graphexamples/point.graphexamples/result-choice.graphexamples/fallibility.graph
Memory and ownership:
examples/memory-primitives.graphexamples/allocator-collections.graphexamples/ownership-cleanup.graphexamples/fixed-vec.graph
CLI and files:
examples/cli-file.graphexamples/cli-config.graphexamples/file-copy.graphexamples/readall-cli/examples/resource-cli/
Data and web:
examples/std-data-formats.graphexamples/json-api-client.graphexamples/json-api-router.graphexamples/crm-api/examples/std-http-json.graphexamples/std-http-request.graph
Compiler and agent workflows:
examples/compile-time-v1.graphexamples/agent-repair-demo/examples/error-tour/examples/memory-package/examples/zero-hash/
Inspect And Run Examples
zero query examples/hello.graph
zero check examples/hello.graph
zero run examples/add.graph
zero build --emit exe --target linux-musl-x64 examples/add.graph --out .zero/out/addBuild And Size Examples
zero build --release tiny --target linux-musl-x64 examples/hello.graph --out .zero/out/hello-linux-musl
zero build --release tiny --target win32-x64.exe examples/hello.graph --out .zero/out/hello-win32
zero size --json --release tiny --target linux-musl-x64 examples/hello.graphSize output reports retained helpers, section sizes, profile facts, target report data, and artifact size. Use it when an agent needs to explain why bytes were retained.
Native Workflow Coverage
The examples intentionally cover arguments and environment, filesystem resources, deterministic exit status, unhandled error exit paths, fixed-capacity storage, HTTP routing, JSON helpers, target status, and repair workflows.
Use them as prompts for agents and as smoke checks for humans reviewing a language change.