Part of finos/morphir#958, phase D (finos/morphir#962). Split out of #237, which closed with the rest of the session layer in #275.
What
Let a guest call back to its host for logging, progress and reading files. No JSON-RPC guest calls the host today, so this lands with the component imports in phase D.
Channel::receive carries guest requests and notifications as well as responses.
JsonRpcConnection runs a dispatch loop: while it waits for a response, it hands guest requests and notifications to the host.
- A client-supplied
HostServices trait in morphir-host (log, progress, read_file), portable to wasm32 like the rest of the crate.
- The Extism host functions in
morphir-host-native (morphir_log and the workspace and cache functions) are bound to the same trait instead of today's stubs.
Done when
Design
Host library spec (beads morphir-opua.1, design), section on HostServices. Tracked in beads: morphir-opua.1.4.5.
Part of finos/morphir#958, phase D (finos/morphir#962). Split out of #237, which closed with the rest of the session layer in #275.
What
Let a guest call back to its host for logging, progress and reading files. No JSON-RPC guest calls the host today, so this lands with the component imports in phase D.
Channel::receivecarries guest requests and notifications as well as responses.JsonRpcConnectionruns a dispatch loop: while it waits for a response, it hands guest requests and notifications to the host.HostServicestrait inmorphir-host(log,progress,read_file), portable to wasm32 like the rest of the crate.morphir-host-native(morphir_logand the workspace and cache functions) are bound to the same trait instead of today's stubs.Done when
HostServicesimplementation throughJsonRpcConnection, pinned by a fake-channel test.morphir-hoststill checks onwasm32-unknown-unknown.Design
Host library spec (beads
morphir-opua.1, design), section onHostServices. Tracked in beads:morphir-opua.1.4.5.