Macro entry

Source
macro_rules! entry {
    ($($plug:ty),*) => { ... };
}
Expand description

Export clap_entry symbols and build a plugin factory.

Use this macro to build a CLAP plugin bundle from types that implement the Plugin trait.

§Example

#[derive(Default)]
struct MyPlugin;

impl Plugin for MyPlugin {
    ...
}

#[derive(Default)]
struct MyPluginToo;

impl Plugin for MyPluginToo {
    ...
}

clap_clap::entry!(MyPlugin, MyPluginToo);

The crate that invokes the macro should be a dynamic library with C ABI. Specify the ABI in your crate’s Cargo.toml:

[lib]
crate-type = ["cdylib"]