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§
- Class
Desc - 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.
- Function
Desc - Description of one exported plugin function.
- Generic
Value - An opaque generic runtime value.
- HostApi
- The host vtable handed to every plugin call.
- Method
Desc - Description of one method of a plugin-defined class.
- Module
Desc - Description of a plugin module; returned by
generic_plugin_init, the one symbol every plugin must export: - Value
Desc - 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§
- Plugin
Fn - The signature every exported plugin function has.
- Plugin
Method Fn - The signature of a plugin method: like
PluginFn, but the receiver (self) arrives as a separate first value, not inargs.args/nargsare the remaining arguments only. - Plugin
Traverse Fn - Per-class GC traversal callback, declared on
ClassDesc::traverse. - Plugin
Value Fn - The signature of a plugin value creator.
- Plugin
Visit Fn - Reports a held
GenericValueto the host’s mark phase during GC.