The Example Matrix

Twenty-seven directories live under examples/. Each has a README covering what it demonstrates, its prerequisites, and the exact command to build and run it. examples/README.md is the index.

Eighteen of them form the verified matrix, run in sequence by one target:

zig build example-matrix

That runs, in order:

run-hello-zaza              proof-library-run           generated-code-run
package-consumer-run        mixed-stack-run             interface-object-graph-run
test-workflows-run          generated-headers-run       shared-plugin-run
preset-profiles-run         cross-compile-cli-report    resources-bundle-run
bindings-run                benchmark-workflow-run      cxx20-modules-run
wasm-wasi-report            wasm-exports-run            wasm-web-demo-smoke

Each entry shells out to ./zig build <target>, so the wrapper must exist. Runs are chained rather than parallel, which keeps failure attribution simple.

The matrix omits the examples that need network access or heavy external toolchains: the three CMake examples, the two JUCE examples, json, and rust_interop. Those are documented individually and run on their own.

What each one covers

ExampleCommandDemonstrates
hello_zazazig build run-hello-zazaA Zig exe and a C++ exe in one graph
proof_libraryzig build proof-library-runA static library with install/export metadata
generated_codezig build generated-code-runA custom command generating a .cpp
generated_headerszig build generated-headers-runA custom command generating a header
package_producerzig build package-producer-runPublishing headers, an archive, and a manifest
package_consumerzig build package-consumer-runConsuming that package from a separate build
mixed_stackzig build mixed-stack-runC library, C++ bridge, Zig executable
interface_object_graphzig build interface-object-graph-runObject library folded into a static library
test_workflowszig build test-workflows-runRun modes differing by arg, env, and cwd
shared_pluginzig build shared-plugin-runA shared library loaded at runtime via dlopen
preset_profileszig build preset-profiles-runZAZA_PRESET selecting a configuration
cross_compile_clizig build cross-compile-cli-reportA nested build for a non-host triple
resources_bundlezig build resources-bundle-runA runtime asset staged into zig-out/share
bindingszig build bindings-runZig calling C++ across a C ABI wrapper
benchmark_workflowzig build benchmark-workflow-runA benchmark as size-specific run targets
cxx20_moduleszig build cxx20-modules-runA C++20 named-module pipeline
wasm_wasizig build wasm-wasi-reportA wasm32-wasi-musl executable, validated
wasm_exportszig build wasm-exports-runA freestanding wasm module with exports
rust_interopzig build rust-interop-runA Cargo staticlib linked into a Zig executable
jsonzig build runnlohmann/json as a Zig package dependency
cmake_shimzig build cmake-shim-runThe smallest complete CMake interop path
cmake_combozig build cmake-combo-runfmt + spdlog built by CMake, linked by Zig
cmake_netzig build cmake-net-runcurl + zlib + mbedtls with an ordering constraint
jucezig build juceA JUCE GUI app through JUCE's CMake integration
zaza-jucezig build zaza-juceA JUCE audio app with the audio modules on

Prefix each with ZAZA_EXAMPLES=<name> to build just that example.

Two of the twenty-six directories are not examples. examples/cmake is an early experiment that is not wired into the root build and does not compile as written. examples/json builds the repo-root src/main.cpp rather than its own source file.