Skip to main content

Module host

Module host 

Source

Modules§

turn_cache
Per-turn memoization of turn-stable host capability reads.

Traits§

HostCallBridge
Embedder-supplied bridge for host_call ops.

Functions§

clear_host_call_bridge
Remove the current thread’s bridge. Idempotent.
dispatch_host_call_bridge
Dispatch (capability, operation, params) to the currently-installed HostCallBridge, if any. Some(Ok(_)) means the bridge handled the call; Some(Err(_)) means it tried but raised; None means there is no bridge or the bridge declined this op (returned Ok(None)).
dispatch_host_operation
Public entry for canonical host_call dispatch without an async-builtin context. Used by embedder tests and by MCP/host plumbing that already sits outside a VM builtin frame.
dispatch_host_operation_with_ctx
Canonical host_call dispatch.
dispatch_mock_hostlib_call
Dispatch a hostlib builtin through the same scoped mock registry used by host_call.
host_call_ready
Box a ready host-call result for sync bridge implementations.
register_callable_host_operation
register_mockable_host_operation
register_scoped_mockable_host_operation
Register a mock-validation declaration scoped to the current test thread.
set_host_call_bridge
Install a bridge for the current thread. The bridge is consulted on every host_call after mock matching but before the built-in match arms, so embedders can override anything they like (and equally punt on anything they don’t, by returning Ok(None)).

Type Aliases§

HostCallDispatchFuture
Boxed future returned by HostCallBridge::dispatch.