Koru v0.1.7
v0.1.7 is out. Most of this release is the language pressing its shape — a number of forms that used to compile, don’t anymore. The parser and shape checker got sharper across identity branches, layout, phantom direction, and branch payload structure. The toolchain story moved forward too: koruc build and koruc run landed, and the npm package now passes a clean-room install + run on debian:bookworm-slim.
npm install -g @korulang/koru@0.1.7
What no longer compiles
Identity branches
The identity-branch migration is done. Single-value branch payloads are now | name i32, not | name { x: i32 }. Single-field struct payloads and single empty-payload branches are rejected at the event declaration site. Empty events declare void instead of carrying a lone | done branch. The whole test suite was migrated in the same diff. (4515b861, 869cd294, fb9986c1, 9ed53ebb)
The principle behind these rejections is that every form should earn its keep. | name { x: i32 } carries no information | name i32 doesn’t. A sole | done branch carries no information a void event doesn’t. When two shapes say the same thing and one is louder, the louder one is just ceremony — and ceremony in a small language is a tax every reader pays forever. So the language took the call to make these shapes illegal, not optional. Koru gets terser and better-defined in the same move.
Layout
|>at line start is malformed in every context, including void chains (7c75a9f9, 9ed53ebb).- Comments that split a flow chain are rejected — KORU010. The flow IS the documentation; mid-chain prose is admission of defeat (cb247f58).
Phantom
- Phantom obligation direction is validated on input vs output params (d407d15f).
- Untracked phantom args that require a specific state are rejected (808258a8).
- Zig-style struct syntax in branch params no longer parses (2aac87be, 84a83aa1).
Tooling
koruc buildandkoruc run— first-class commands instead of “run koruc, thenzig build, then the binary” (34938011).- Parser errors now render with hints, column spans, and user-facing line numbers (dd3253e0).
- Unit tests run by default as part of
--status(915ba0f3). expected_patterns.txtin the regression harness — regex matching against runtime output for tests where exact equality is the wrong shape (7366b2f0).- Outside-the-bubble docker test — a clean
debian:bookworm-slimimage installs the published tarball, downloads Zig 0.15.2, and runs hello world + sample regressions through the full 4-stage pipeline. The portability surface is small: node, npm, and a system Zig (d56eb7e9).
Fixes
- Auto-discharge preserves
branch_constructorthrough void disposal (d85a895d). - Parser stops truncating chain steps when a branch body ends in a multi-line brace (34938011), and attaches same-indent branches to the last step in a void chain (e401ffde).
- Phantom checker resolves binding mismatches that surface after auto-discharge renames (50b23aae).
- Identity branches — many small fixes across phantom tracking, escape detection, transform return types, and the failed-branch path (d64f62d2, df6ed5d4, a8b77fdd, 0f80c818).
Koru is an event-continuation language. Read the source, or start with Introducing Koru.