Releasing v0.1.6 — State Machines, Wire System, and a Lot of Cleanup

· 2 min read
v0.1.6

This one got away from me — what started as “add machine types” turned into the largest release since v0.1.0, with 64 PRs merged and every layer of the compiler touched.

First-class machine type. Value-type state machines with compiler-checked exhaustiveness, event payloads, guards, mutating step, inferred bodies, and a default { self } clause for states that don’t handle an event. hew machine on the CLI extracts and visualizes state machine diagrams from your code. Part 26 covers the design in detail.

bytes primitive type. b"hello" for literals, bytes [0x01, 0x02] for construction. This existed as a library type before — promoting it to a primitive was necessary for the wire system.

Wire system redesign. Three phases landed in one release: transparent encoding, bytes roundtrip, versioning, and actor integration. Messages serialize correctly now. (They serialized before too, just not correctly.)

Multi-file module resolution and imported actor codegen. import app::module resolves from the project root, finds the file, type-checks it, and generates code for its actors. This sounds basic. It took four PRs.

Implicit [T; N] to Vec<T> coercion. Array literals convert to vectors without an explicit call. Small ergonomic win, but it removes a paper cut that showed up in nearly every example program.

MLIRGen simplification series. Broke the monolithic codegen into MLIRGenExpr, MLIRGenStmt, MLIRGenActor, MLIRGenWire — and removed 1,344 lines in the process. Also eliminated dedicated builtin Ty variants in favour of Ty::Named, simplified hew-parser, hew-types, and eight stdlib crates. Numeric conversion and math intrinsics. Operator precedence now matches Rust.

18 correctness sprints across the type checker, codegen, and parser, each fixing a cluster of related bugs that surfaced from the machine type work.

CI improvements. Test reports, Clippy SARIF, coverage, hew test --format junit, Windows CI for all std tests, deterministic supervisor restart tests.