Skip to main content

export_plugin

Macro export_plugin 

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

Emit the foldit_plugin_vtable symbol for a plugin.

Takes a constructor fn(&str) -> Result<Box<dyn Plugin>> receiving the host’s JSON config (always contains plugin_dir).

ⓘ
fn new_plugin(config_json: &str) -> foldit_plugin_sdk::Result<Box<dyn Plugin>> { .. }
foldit_plugin_sdk::export_plugin!(new_plugin);