Skip to main content

rustbridge_entry

Macro rustbridge_entry 

Source
rustbridge_entry!() { /* proc-macro */ }
Expand description

Generate the FFI entry point for a plugin

This macro creates the plugin_create extern function that the FFI layer calls to instantiate the plugin.

§Usage

For plugins using Default:

rustbridge_entry!(MyPlugin::default);

For plugins using PluginFactory::create (receives config at construction time):

rustbridge_entry!(MyPlugin::create);

When using ::create, the macro generates both plugin_create() and plugin_create_with_config(config_json, config_len) FFI functions.