Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Nazm 0.10.0 — R1: the language for the rewrite

Toolchain 0.10.0. Language: the 1.0 draft, with R1’s additions now stable. Target: macOS on Apple Silicon (aarch64-apple-darwin) only. This file records what the release is, what was checked for it and what was not; it is not updated as the project moves. Current implementation truth is ../capability-matrix.md; what is not done is ../limitations.md.

What a preview is

As for 0.9.0 (0.9.0.md): no compatibility promise until 1.0; the toolchain is the Rust implementation, to be rewritten in Nazm before 1.0; one released target; external contributions not accepted yet.

Changes that can break a 0.9.0 program (each named in ../spec.md):

  • main’s result is the exit status. A program no longer prints what main returns; an Int result outside 0–255 is N0416. NAZM_RESULT_REPORT=1 restores the old printing.
  • Ints and Strs are Vec[Int] and Vec[Str] — one type each. Diagnostics name them by the shorter names; a Strs and a Vec[Str] share one provenance cell.
  • A line beginning with ( or [ begins a statement: a call’s ( and an index’s [ are on the line of what they apply to.
  • nazm build writes an authority: line on standard error naming what the program may touch.

Installing

Unchanged from 0.9.0: download nazm-aarch64-apple-darwin.tar.gz and SHA256SUMS, check, unpack, put bin/nazm on PATH; the binary is ad-hoc signed (clear quarantine once); nazm build needs the Xcode Command Line Tools.

What is in it

R1 — the language the rewrite will be written in — is complete and stable (spec.md, Stability classification for 1.0: a 1.x addition stable since R1 closed):

AreaWhat
Writing lessfn main() { println("Hello, world!") } — printing needs nothing written (option C: every other authority is still in main’s signature); a function with no result type; lines without ;; else if; += and its kin; print/println of any value; Some/None/Ok/Err; let x: T; loop, while let, match guards; impl T { … }; methods by name (v.push(x), s.split(" ")); xs[i]; m[k], m[k] = v, m[k] += 1; s + t; [1, 2, 3] as a sequence; ? on Option; block comments
Datapatterns, tuples, for, Box/List, Cell, derived ordering and hashing, constant tables, multi-line and raw strings, f"…" interpolation, Int128/UInt128, checked arithmetic, defer
Serialisation@derive(json), @derive(toml), @codec(…), JSON Schema; @std/toml
Libraries@std/sha256, @std/blake3, @std/regex (linear time), @std/args, @std/bytebuf, @std/ordmap, @std/bitset, file_walk, in-place sorts
Platform--heap-limit, streaming standard input, process control and the filesystem built-ins (R1d)
Reportingnazm build and nazm inspect report the program’s authority

Speed (Apple M1 Pro, ../performance.md, the cross-language comparison, 15 languages, run with this release’s binary): fib(35) 55.3 ms (C 35, Go 40, Java 60, C# 80); word frequency over 2,000,000 words 188 ms (C 74, Go 89, Python 250, C# 272, Java 388). A failed call is now signalled in a register and failure paths are laid out cold; the standard library’s text and map paths were rewritten; a field read as an operand is borrowed.

Licences

Unchanged from 0.9.0.

What was checked, and what was not

Run on macOS 27 on Apple Silicon, on 403aa68d — the released source but for documentation and the clean-install script’s update to 0.10.0’s exit status, which the archive was then tested with:

  • The host suite: 2,936 tests; 2,895 passed, 81 skipped, and 41 refused — the self-hosting tests, which run only inside the container and refuse on the host by design. The doc tests, cargo xtask check, cargo fmt --check and cargo lint are clean.
  • In the container (4 GiB, 4 CPUs, a one-hour deadline): the whole test suite passed (2,922 passed, 94 ignored); the self-hosting gate passed 44 of 44; the bootstrap passed — the compiler written in Nazm, built by itself, is byte-identical to the build before it, and 34 conformance programs and 31 refusals agree with the reference.
  • Mutation testing of R1: all 320 mutants written for R1 — R1a through R1e, the speed work and the promotion to stable, with the earlier mutants they repointed — were run in the container. 309 were caught by the tests named for them. 7 survived those tests at first; each test was sharpened (the mutant never weakened) and the 7 were then caught. 3 were proved equivalent — each survived the whole workspace suite applied, and why is recorded beside it in the catalogue — and two of them were replaced by mutants that attack the rule where it lives. One is caught on macOS, where Nazm is released, and has no visible effect inside the Linux container, whose system gives the runtime’s own answer; that is noted beside it too.

The archive’s SHA-256 is in SHA256SUMS beside it on the release page.

Not done for this release, and named so:

  • The full release mutation catalogue (about 1,700 mutants) was not run; it stays outstanding for 1.0. R1’s own mutants were all run (above).
  • Platforms. Only macOS on Apple Silicon is released. Real Linux and Windows x86_64 machines, and real Windows, remain final-1.0 qualification items; Windows is exercised under Wine only.
  • Signing. The binary is ad-hoc signed and not notarized.
  • Legal. The CLA’s legal review, and a trademark search and registration, are open.

Appendix — the workspace suite by crate

The host suite (cargo nextest run --workspace) on the released source, read from its log and grouped by crate. The 41 self-hosting tests in nazm-cli are left out: they refuse on the host by design, and the container’s selfhost workload runs them (above). Inside the container, cargo test --workspace gave 2,922 passed, 0 failed and 94 ignored — the same tests, 13 of them ignored there because they need this host (a debugger, Rosetta, the iOS SDK, signing) and the doc tests counted.

2895 passed, 0 failed, 81 ignored.

CratePassedIgnored
nazm-agent-bench210
nazm-bench10010
nazm-cache650
nazm-cli151746
nazm-codegen-clif10
nazm-core3880
nazm-diag60
nazm-docs250
nazm-formal110
nazm-iface420
nazm-lir250
nazm-mcp332
nazm-mir10
nazm-package280
nazm-repo211
nazm-runtime120
nazm-sema400
nazm-service2611
nazm-span140
nazm-syntax1051
nazm-tokens161
xtask16319