Skip to main content

Module guest

Module guest 

Source
Expand description

The guest API surface: every supported call as a typed function.

One description of each call (its name, its arguments as the guest sees them, how each becomes a call word, its result) feeds every guest transport, so the Wasm and native guest APIs cannot differ in names or types. This module builds that description from the registry and emits the native transport’s bindings: Rust functions, the C-ABI declarations a header is generated from, and their C definitions. Hand-written code is only the transport’s raw call.

Structs§

GuestCall
One call as the guest sees it.
Input
One argument as the guest sees it.

Enums§

Word
How a guest value becomes one call word.

Constants§

C_PREFIX
The prefix of every exported C name and of every C type.
TYPES_SOURCE
Guest-visible types, as Rust source. Every transport’s bindings include it.

Functions§

c_declarations
The C-ABI declarations a header generator reads: names and types only. The bodies are never compiled.
c_definitions
The C definitions of c_declarations: each packs its arguments into words and makes one call through the transport’s raw xila_graphics_call, whose first argument the transport names (process).
calls
The guest description of every call in the registry, in catalog order.
rust_functions
Rust functions over a transport’s call::<T>(FunctionCall, &[usize]), which returns the call’s result or its non-zero status.