The tools are renamed after their input and output: zi2zx lowers source
or ZIR to executable ZX, zx2native turns ZX into a native ELF, zx2wasm
into a wasm32 module, and zi2c, zi2go and zi2zir keep their roles under
cmd/ folders of the same names. zi2asm and the cmd/zir-* folders are
gone, and tests/tool_names.sh keeps the old names out. zx2native keeps
the direct encoder as its default; the machine pipeline replaces it once
it reaches parity.
The embedding API can run a verified bundle as x86-64 machine code in
memory. Code is written to RW pages, relocated, then switched to RX,
never RWX, and each instance gets its own data
(cmd/zir/zir_native_memory.c, zir_host_native.c). Backend selection is
BundleBackendPolicy: Engine and Native are strict, and Auto chooses by
platform only, never by whether one program fits. A native gap is a
named error, never a switch to the engine. Desktop x86-64 Auto stays on
the engine until the native backend is complete.
cmd/compiler_machine_image.zi adds the target-neutral machine image
contract. The machine verifiers reject unknown relocation kinds,
out-of-range symbols and addends, non-host external calls, native-width
mismatches and missing stack or fuel facts. The machine pipeline lowers
and encodes more of LIR. Docs, site pages, Kryon's build references and
the benchmarks use the new names.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
zi2zx bundle and ziran run always write and run revision-28 executable
ZX. The semantic bundle reader and writer, the portable VM, the
TinyCC-compiled and linked native bundles with the vendored TinyCC,
bundle libraries, the VM profile, --vm, BundleInstantiatePortable,
libziran-vm.a and the ZIR-based Wasm lowering with zi2wasm are removed;
the Wasm tier, the embedding API and every tool run revision 28. Tests
of the removed VM internals and libraries are removed, and the rest run
on revision 28. Engine problems read as the diagnostics users rely on.
A global holding owned storage, alone or in a record, such as Jungle's
collection and treasure records with Text fields, can now be assigned:
`collection = CollectionParse(text)` or `shelf.items = TextCopy(name)`
completes the new value, frees the old one and stores it. A declaration,
assignment or return that moves a global, as in `taken := collection`, or
a record literal field in one, takes the storage and leaves the global
empty, so later reads see an empty value. C clears the moved place and the
VM resets it to its type's default. A call argument or VecPush element still
cannot move a global, because that would empty it as a side effect; the
error now says to pass its address or move it into a local first. Replacing
or moving a global while a view of it is live stays rejected by the borrow
check. tests/global_owned_storage.sh runs 1000 rounds allocation-counted
(2 held, 0 after moving out), under ASan, from source and saved IR, and
in native and VM bundles.
VecPush rejected any element that owns a Vec, a guard older than aggregate
moves and recursive drops. VecPush now moves an owned element in as an owned
call argument does; indexing, member paths, for * and in-place mutation
reach the inner storage, and copying an element out by index gets a clear
error. The portable VM accepts Vec(Vec(T)), retires the originals that
VecPush, field initializers, declarations and VecPop copy or replace, and
the VM and native targets free a discarded owned record result.