Cookbook
The cookbook is backed by site/cookbook-inventory.tsv. Every current recipe
links to existing source, docs, or app artifacts.
First Program
Source: examples/main.0x0
Run:
./bin/zero run examples/main.0x0
Expected output:
42
Arithmetic
Source: examples/add.0x0
Use this for the smallest integer arithmetic example.
Lists
Source: examples/list-ops.0x0
Use this for list, cons, head, tail, empty?, len, nth, and
reverse examples.
Text Processing
Sources: examples/string-ops.0x0, examples/text-more.0x0
Use these for text length, equality, slicing, concatenation, and character
classification examples.
Option And Result Conventions
Source: examples/core-data.0x0
Use this for list-backed core data conventions. Do not present these as full ADT
syntax.
Argv
Source: examples/argv.0x0
Keep CLI parsing at the boundary and pass validated values into pure helpers.
Environment
Source: examples/env.0x0
Environment access is effectful. Keep it at the edge.
Stdin
Source: examples/stdin.0x0
Document expected input and output whenever a recipe reads stdin.
File I/O
Source: examples/file-io.0x0
File behavior is effectful and should be documented with stable paths and
expected output.
Safe File
Source: examples/safe-file.0x0
Use safe path/file helpers when recipes need defensive file handling.
Imports
Source: examples/import-main.0x0
Use ↥ to load another local .0x0 file.
Namespaced Imports
Source: examples/import-namespaced-main.0x0
Use aliases when imported names should remain explicit at call sites.
Package Imports
Source: examples/compiler2-package-import.0x0
Use pkg: imports only for dependencies present in 0x0.lock.
Generated API Docs
Docs: Generated API
Use doc annotations on public functions and keep generated API docs fresh
through the repository workflow.
Standalone Library
Docs: Standalone Libraries
Every public library should have src/lib.0x0 and tests/smoke.0x0.
Local Effects
Docs: Local effects runtime
Use this recipe area for filesystem, CLI/environment, and subprocess runtime
boundaries.
Fetch And Browser
Docs: Fetch and browser runtime
Use this recipe area for HTTP client and browser snapshot boundaries where the
current runtime docs provide evidence.
Web Runtime
Docs: Web runtime
Use this recipe area for HTTP server, router, WebSocket, and Live-compatible app
runtime boundaries. Do not present app runtime behavior as generic language
behavior.
Service Boundary
Docs: Service boundary runtime
Use this recipe area for database, auth, service adapters, backup/restore, and
job boundaries.
Index Pure Workflow
Docs: Index pure rewrite
Tie Index recipes to pure source surfaces and accepted behavior evidence.
Index Runtime Workflow
Docs: Index runtime replacement
Tie runtime recipes to release entrypoints and manifests.
Kukulkan Package Workflow
Docs: Kukulkan pure packages
Use this recipe area for package-level API, events, compliance, geospatial, and
service-stack behavior.
Kukulkan API Workflow
Docs: Kukulkan API runtime
Use this recipe area for API boot, routing, auth, database-backed workflows, and
runtime probes.
Kukulkan UI Workflow
Docs: Kukulkan UI runtime
Use this recipe area for static UI, Live-compatible behavior, browser bridge,
and browser quality gates.
Accepted Behavior Corpus
Artifact: apps/accepted-behavior-corpus.tsv
Use accepted corpus recipes only when they import app source through the
production source-package path.
App recipes must respect Apps real production gap.