Skip to main content
Nine .mz files live in primitives/ in mzizi-dev/mzizi. Every one parses clean under mz check and CI gates the whole set on every push, so they are verified source rather than aspirational examples.

What a primitive looks like

button.mz, in full, is the clearest single demonstration of what the language is for:
primitives/button.mz
The height column is the whole argument in miniature. The touch floor is a rule the design system’s own doctrine calls non-negotiable, and the TypeScript violated it in five separate components — because there, the heights lived only inside Tailwind class strings, where nothing could check them. Here the height is data on the variant, so one line holds the whole table to the floor:
mz contract button.mz evaluates that line and the four beside it, and exits 1 if one does not hold. CI runs it over every primitive: 29 clauses across the nine files, all evaluated.
A contract checks the component against itself, not against anything rendered and not against a reference implementation. The second pilot’s 7B model found a gap in that: it wrote icon class "size-14" height 48, and the contract read the 48 while the class renders 56px. That gap is now closed. A row may leave height out and the evaluator reads it from an h-N or size-N class, and a height that disagrees with its class fails mz check with MZ0313. See the compiler.

No import lines, and why that is possible

confirm_bar uses button and alert without a single import statement. That follows from two facts rather than from sloppiness:
  • The namespace is flat and names are globally unique. The registry already enforces one component, one name. A bare button in a view is unambiguous.
  • Resolution is by hash, recorded outside the source. Which button a component got is pinned in the project manifest, not written into the file. The source says what; the manifest says which. The IR is the mechanism underneath this.
So every import line in every component — ceremony carrying no decision, FM-6 — simply does not exist. use in Mzizi is reserved for capabilities (use motion), which is a decision and one worth reading.

Primitives are not crates

This is the load-bearing packaging decision, and the answer differs by tier rather than being uniform.
mz, the compiler and the runtime host bindings are ordinary Rust software. Cargo is the best package manager in existence and RFC-0002 §3 already names its UX as the bar to hit; there is nothing to gain from inventing a second one. An app depends on the runtime crate for its target (web / native / edge).
The intended distribution is cargo install mz. It does not exist — the crate is version = "0.0.0", publish = false, and unreleased. Build from source.

Where the primitives came from

Each file names its corpus reference in a doc comment — button.mz points at n2-primitives/button.tsx, connectivity_bar.mz at n7-shell/mzizi-connectivity-bar. These are hand ports of components that already exist in the Mzizi registry with working TypeScript implementations, and in many cases Rust siblings, which is what makes them ground truth rather than invention. The same components are the ground truth for the Phase 0 benchmark’s UI tasks, one family among the ones Mzizi is measured on.