Skip to main content

Module console

Module console 

Source

Constants§

DECLARED_EFFECTS

Functions§

call
Returns Some(result) when name is owned by this service, None otherwise.
call_nv
capture_output
Run f with all Console.* writes inside it redirected to in-memory buffers. Returns (f_result, stdout_bytes, stderr_bytes). Nesting is illegal — the outer call’s buffers would mix with the inner’s; we panic rather than silently merge. The expected user is the fuzz harness, which never nests captures.
effects
register
register_nv
write_stderr_plain_str
Capture-aware eprintln!-equivalent. Same rationale as write_stdout_str.
write_stdout_str
Capture-aware println!-equivalent — embedders that bypass the Console.print builtin (currently the wasm-gc backend’s import handler in runtime::wasm_gc::imports::lm) should call this instead of raw println! so the thread-local capture_output buffer sees their writes too.