Skip to content

Placement

host: in realm.yml is optional. The platform reconciles the declared value with what is on disk:

declared on disk placement
absent dist/handlers.wasm present wasm
absent no wasm bundle docker
docker no wasm bundle docker
docker wasm bundle present conflict
wasm bundle present wasm
wasm no bundle, wasm/handlers.js present wasm — bundle built on load
wasm no bundle, wasm/handlers.ts present wasm — TypeScript compiled and bundled on load
absent wasm/handlers.ts present, nothing else wasm — handler source under wasm/ is the declaration. It placed such a realm on docker until me#1565, which loaded no functions and showed verbs: []; if a host still does that, declare host: wasm.
wasm neither conflict

A conflict surfaces as a world-loading problem with a one-sentence reason and a suggested host: fix; the realm’s declarative content still loads. docker with a bundle present is a conflict deliberately: a stale bundle must never sit silently beside a host that isn’t running it.

An unrecognized host: value fails the executable surface closed: the host records a problem and loads the realm’s declarative content, but registers no functions and never infers an executable host.

Three consequences of the table worth stating:

  • With no host: declared, wasm artifacts decide placement by themselves: wasm/handlers.js beside a docker-style src/ project places the realm on wasm, and the docker handler modules are not used for dispatch. Declare host: docker to keep a mixed-source realm on docker (the wasm bundle then surfaces as the conflict above).
  • When both wasm/handlers.js and a bundle exist, the source is the truth: the host rebuilds the bundle whenever the source fingerprint changes (build on load).
  • The wasm kill switch is a dispatch-time control, not a placement input: with wasm disabled the realm still loads its declarative content, but its functions are unavailable and attempted dispatches produce a recorded refusal.