Summary
M0 establishes the repository skeleton: a build.zig that declares the full module graph with compile-enforced dependency direction, empty module roots, vendored jinja_cpp sources, Homebrew version gates for mlx/mlx-c, and a green zig build test in CI. Every later milestone (M1-M6) builds on this scaffold, so the goal is that the repo compiles and tests pass from day one, with the module import tables already acting as the architecture enforcement mechanism.
Reference: plan milestone M0 and the module graph in the project plan; CLAUDE.md documents the invariants this skeleton must encode.
Scope
In scope: build system, module declarations, empty roots, vendored jinja_cpp build, brew gates, test plumbing, CI workflow. Out of scope: any ported logic from mlx-serve (that starts in M1), any mlx-c externs beyond what is needed to prove linking works.
Stages
Each stage is tracked in its own sub-issue with the full phase/task breakdown.
Stage 1: Project scaffold
Stage 2: Native dependencies
Stage 3: Tests and CI
Acceptance criteria
zig build produces an mlxd binary whose four subcommands run and exit 0
zig build test is green locally and in CI
- The module import tables in
build.zig match the dependency graph in CLAUDE.md exactly, and an undeclared cross-module import is a compile error
vendor/jinja_cpp builds from source with no prebuilt artifacts checked in
- Missing or outdated brew mlx/mlx-c fails configuration with an actionable error message
Dependencies and sequencing
Stage 1 has no prerequisites. Stage 2 depends on Stage 1 (modules must exist to attach native deps). Stage 3 depends on Stages 1-2 (CI runs the full build including native linking). Within stages, phases are sequential; tasks within a phase are mostly parallelizable.
Summary
M0 establishes the repository skeleton: a
build.zigthat declares the full module graph with compile-enforced dependency direction, empty module roots, vendored jinja_cpp sources, Homebrew version gates for mlx/mlx-c, and a greenzig build testin CI. Every later milestone (M1-M6) builds on this scaffold, so the goal is that the repo compiles and tests pass from day one, with the module import tables already acting as the architecture enforcement mechanism.Reference: plan milestone M0 and the module graph in the project plan;
CLAUDE.mddocuments the invariants this skeleton must encode.Scope
In scope: build system, module declarations, empty roots, vendored jinja_cpp build, brew gates, test plumbing, CI workflow. Out of scope: any ported logic from mlx-serve (that starts in M1), any mlx-c externs beyond what is needed to prove linking works.
Stages
Each stage is tracked in its own sub-issue with the full phase/task breakdown.
Stage 1: Project scaffold
Stage 2: Native dependencies
Stage 3: Tests and CI
Acceptance criteria
zig buildproduces anmlxdbinary whose four subcommands run and exit 0zig build testis green locally and in CIbuild.zigmatch the dependency graph inCLAUDE.mdexactly, and an undeclared cross-module import is a compile errorvendor/jinja_cppbuilds from source with no prebuilt artifacts checked inDependencies and sequencing
Stage 1 has no prerequisites. Stage 2 depends on Stage 1 (modules must exist to attach native deps). Stage 3 depends on Stages 1-2 (CI runs the full build including native linking). Within stages, phases are sequential; tasks within a phase are mostly parallelizable.