Skip to main content

Module host_fn

Module host_fn 

Source
Expand description

Caller-supplied native function specifications.

The compiler accepts a list of HostFnSpec entries (rpc/cli/tui all provide their own) and treats them as first-class native callables: the corresponding wasm imports get registered when CompileContext is built in eval mode, and the native dispatcher emits a (call $idx) whenever a nomiscript form references the spec’s nomi_name. The matching host-side linker registration is the consumer’s responsibility — see rpc::natives::link for the rpc layer’s mirror.

Structs§

HostFnSpec
Description of a single host fn the caller wants nomiscript code to be able to invoke.