Skip to main content

Module native

Module native 

Source
Expand description

The native ABI: host functions that read their receiver and arguments from the register file by index and call back into JavaScript through the re-entrant call and construct as straight-line Rust. A native roots what it holds across an allocation or a call on the root stack, which is cut back when it returns. The natives themselves are the realm’s builtins (crate::builtins).

Structs§

HostBody
Rc<HostFn> with a Debug that names the kind and not the closure.
NativeCall
Where a host function finds its receiver, arguments, new.target and captured values, read through a NativeCx. The arguments stay in the register file, rooted, while the body runs.

Type Aliases§

HostFn
A host function’s body: the embedder’s Rust code, called with the engine’s view and the call.