Skip to main content

Module runtime

Module runtime 

Source
Expand description

Engine-instance lifecycle across the FFI boundary: the factory registry, the per-handler EngineContext, create/destroy entry points, and the FfiPtr pointer helpers. Per-method rust__handler__* callbacks live in crate::handler; both modules share the safety contract documented there.

Structs§

EngineContext
Per-handler Rust-side state owned through Box::into_raw. The C++ RustHandlerBase keeps a void* to one of these.

Functions§

register_engine_factory
Install factory on the process-wide engine registry. Call this once from the plugin’s rust__plugin_init; later calls are ignored.
register_handlerton
Install handlerton as the process-wide engine-level handlerton.
rust__create_engine
Allocate an EngineContext; null if no factory or the factory panics
rust__destroy_engine
Drop a context returned by rust__create_engine

Type Aliases§

EngineFactory
Factory closure that produces a fresh engine instance per opened table