Skip to main content

export_plugin

Macro export_plugin 

Source
macro_rules! export_plugin {
    ($plugin_type:ty) => { ... };
}
Expand description

Generate the stable native ABI entry point for a MultiToolPlugin.

This macro expands to an extern "C" function named cortex_plugin_init that fills a C-compatible function table. The plugin type must implement Default.

§Usage

cortex_sdk::export_plugin!(MyPlugin);

§Expansion

The macro constructs the Rust plugin internally and exposes it through the stable native ABI table. Rust trait objects never cross the dynamic-library boundary.