Skip to content

M0 Skeleton: build system, module graph, vendored deps, CI #1

Description

@tlkahn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestepicTracking issue for a multi-phase featurem0-skeletonM0 skeleton milestone work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions