Documentation
¶
Overview ¶
Command host is the processmodule-demo's host app. It registers the demo module (examples/processmodule-demo) as an UNTRUSTED process module, so the child runs under this host's sandbox backend (bwrap on Linux, sandbox-exec on macOS), and serves the module's routes:
go build -o dist/examples/processmodule-demo ./examples/processmodule-demo go run ./examples/processmodule-demo/host -module dist/examples/processmodule-demo curl localhost:8091/demo/hello
Before it registers the module the host asks framework.App.ProcessModuleSandbox whether this machine can confine an untrusted module at all. That call probes the backend with the P1–P7 conformance suite, re-running THIS binary as the probe child; the framework's package init answers the probe, so main has no hook for it. On a host that does not conform the module stays off and the host says which probe failed; -trust=trusted runs it with crash isolation only.
-check-sandbox prints the conformance report as JSON and exits. The tests (and the sandbox-conformance CI job) use it to run the probe through a real host binary rather than the framework's test binary.