Expand description
Host output channel for the eval-mode module.
PRINT / DISPLAY / NEWLINE / DEBUG lower to a call into the env.log
import ((i32 level, i32 ptr, i32 len) -> ()), reading the message from
the guest’s exported linear memory. Script mode wires this in
scripting::host; the rpc Session path needs the same import or those
natives can’t compile. Output is routed to tracing (the rpc channel has
no separate stdout) — same sink and level mapping as the script-mode host.
Functions§
- register
- register_
silent - Links a NO-OP
env.logfor the render surface. Eval-mode modules always importenv.log(PRINT/DISPLAY/DEBUG lower to it), so the import must resolve — but a template is untrusted source with no legitimate output channel, so render discards the message entirely: no per-request buffer append, notracingtee. This closes the log-flood / unbounded-host-memory side channel a realenv.logwould hand an attacker-controlled template.