services

command
v5.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 11 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL