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:
That line parses and is not evaluated. Contract bodies are syntax today; the checker lands with contract evaluation, which is what will finally let mz check run them as tests. Until then these files are verified syntax and a verified grammar exercise — which is what Phase 0 needs and no more than it claims.

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/nyuchi-connectivity-bar. These are hand ports of components that already exist in the Mzizi registry with working TypeScript and partially-ported Rust implementations, which is what makes them ground truth rather than invention. The same corpus is the Phase 0 benchmark task set.