Documentation
¶
Rendered for js/wasm
Overview ¶
Command services is the domain-worker half of v5's two-artifact packaging (plan item P3.10).
This is where the engine lives. It imports db/offthread/server, which imports db/sqlite, which embeds wazero — roughly a megabyte of wasm interpreter that must not be in app.wasm. It also runs the command runtime and the delta publication engine, because both belong beside the data they operate on.
M10 measures this binary's size and its time to first command.
The protocol is the smallest thing that can carry a typed command and its reply. Both directions are keyed by a request id, which is what lets several commands be in flight at once without a reply reaching the wrong caller:
in {id, name, request}
out {id, payload} success
out {id, err} the domain refused
out {ready:true} posted once, when this handler exists
Click to show internal directories.
Click to hide internal directories.