The VM crates are layered
One ABI leaf every party links (core and synod included); one guest program with no exec and no argv; the gate owns the ledger and the agent reads one bit; the privileged service is its own crate. This decision supersedes nothing.
Amended 2026-11-24. See windows-runs-openvmm. There is no privileged service: the
synod-machine-brokercrate, its row in the table below and itstempfiledev-edge are gone.vm-managerowns every machine, and on Windows it spawnsopenvmm.exeitself.vm-managerdroppedserdeandserde_jsonand gained no crate. The other rows stand.
Amended 2026-12-01. The guest supervisor (
exarch::vm) moved intoexarchbehind its defaultvmfeature, which static musl guest builds (--no-default-features --features coreutils) leave out. The shared GUI shell is thedesktopcrate (desktop);synodandexarch-guiare thin products over it, chosen by&'static Product. Thesynodrow below is replaced by these, andexarchgainsguest-abi:
Crate May depend on exarchral-core,guest-abi; withvm, alsovm-manager,netgatedesktopexarch(withvm),ral-core,vm-manager,netgate,guest-abisynoddesktop,exarch,ral-core,vm-manager,guest-abiexarch-guidesktop,exarch,ral-core,vm-managerThe dev-only edges are
{desktop, synod, exarch-gui} → {exarch, ral-core}[test-util], in place of synod’s.
Why
Shared facts need one owner, and each layer should require only the authority it exercises. The previous structure admitted five avoidable defects:
- Host and guest spelled runtime constants independently, allowing drift.
- The broker checked the pipe version after a privileged boot.
- Direct machines requested 6 GiB while broker-owned machines received 4 GiB.
- Host-mode exarch opened an audit ledger it never wrote.
- Exarch and synod applied separate tuning-mask laws.
The ABI leaf, version refusal before boot, shared SIZE, gate-owned ledger
and Tuning::masked each remove the corresponding second source of truth.
Decision
guest-abiis std only. The host, guest PID 1, engine, synod and image build-tools share the runtime agreement through this leaf.ral-guestcombines assembly and service in one PID 1; its net pump is two threads, and its first act refuses execution outside PID 1.- Core owns egress policy data,
netgateowns its ledger, and exarch loads policy and reads the search bit. vm-managerowns machines and their lifecycle;synod-machine-brokerowns the privileged service. Synod’s guest seam composes their capabilities.
Dependency invariant
These are the allowed normal dependencies between workspace crates:
| Crate | May depend on |
|---|---|
guest-abi | none (std only) |
ral-core | guest-abi |
ral-guest | guest-abi |
vm-manager | guest-abi |
netgate | guest-abi, ral-core |
exarch | ral-core |
ral-vm-image-build-tools | guest-abi, ral-core |
synod-machine-broker | vm-manager |
synod | exarch, ral-core, vm-manager, netgate, guest-abi |
Dev-only edges are vm-manager → ral-core for boot-smoke,
netgate → netgate[test-util], synod → {exarch, ral-core}[test-util]
and synod-machine-broker → tempfile.
The removed edges are guest-net → exarch and the dependencies on
ral-daemon from synod, ral-initramfs, vm-manager, guest-net and build-tools.
cargo tree -p netgate -e normal must show no exarch dependency;
cargo tree -i guest-abi --depth 1 -e normal checks the leaf’s direct users.
Where
guest_abi:guest-abi/src/lib.rsdeclaresboot,ports,link,layoutandpacket. A change toboot,ports::FACTORY,layoutorpacketbumpsboot::CONTRACT.ral-guest/src/main.rs: one binary callsassemble::assembletheninit::servein the same PID 1. Admission and shutdown live ininit/{fleet,halt}.rs;reap::failrecords the first fatal notification.vm-manager/src/spec.rs:boot_lineconstructs the sharedBootand calls its sole writer;machine.rsownsBootedand the required machine methods, includingMachine::dial_engine.error.rsownsGuestConsole::report; the crate root exports the public facade.netgate/src/lib.rs: the host CONNECT gate exports its session, dialer and ledger API;stack.rsownsConfig,pipe.rsownsWake, and privaterefusal.rssupplies both decoder and vetter. Device access requirestest-util;ledger.rsowns records, and core owns egress policy data.vm-manager/src/openvmm/:OpenVmm, the Windows backend, spawns and owns one unprivilegedopenvmm.exeper machine.exarch/src/vm.rs(featurevm):Guest, the machine’s factory,boot_media,availableandFolder, the one VM harness forexarch --vmand both desktop products.desktop/src/lib.rs: the shared shell overfolder,wire,assistant,seamand the feature-gatedwindow;wire.rsexports the TS bindings todesktop/ui/js/bindings/.synod/src/{main,lib,grant,prompt}.rsandexarch-gui/src/{main,lib}.rs: each product’s&'static Product, handed todesktop::run.
Known follow-up
Rootfs-publication eviction and abandoned .tmp stage cleanup remain open.
Old cache files and flat session disks are left for the owner to remove.