Skip to main content

Module abi

Module abi 

Source
Expand description

The raw C ABI shared between the generic interpreter and its plugins.

Everything in this module is #[repr(C)] and mirrored in the generated include/generic.h for non-Rust plugins. Plugin authors normally use the safe wrapper in the crate root instead of these types directly.

Structs§

ClassDesc
Description of a plugin-defined class; one entry per class in ModuleDesc::classes.
FfiReturn
Result of a plugin function or a re-entering host callback.
FfiStr
A borrowed UTF-8 string. Not NUL-terminated.
FunctionDesc
Description of one exported plugin function.
GenericValue
An opaque generic runtime value.
HostApi
The host vtable handed to every plugin call.
MethodDesc
Description of one method of a plugin-defined class.
ModuleDesc
Description of a plugin module; returned by generic_plugin_init, the one symbol every plugin must export:
ValueDesc
Description of one exported plugin module value (a module constant, built once at import time).

Enums§

FfiStatus
Discriminator for FfiReturn::status.

Constants§

GENERIC_PLUGIN_ABI_VERSION
Version of the plugin ABI described by this crate.

Type Aliases§

PluginFn
The signature every exported plugin function has.
PluginMethodFn
The signature of a plugin method: like PluginFn, but the receiver (self) arrives as a separate first value, not in args. args/nargs are the remaining arguments only.
PluginTraverseFn
Per-class GC traversal callback, declared on ClassDesc::traverse.
PluginValueFn
The signature of a plugin value creator.
PluginVisitFn
Reports a held GenericValue to the host’s mark phase during GC.