Skip to main content

clack_export_entry

Macro clack_export_entry 

Source
macro_rules! clack_export_entry {
    ($entry_type:ty, $entry_lambda:expr) => { ... };
    ($entry_type:ty) => { ... };
}
Expand description

Exposes a given Entry type to the host as the library’s entry point.

This macro exports the standard CLAP symbol clap_entry, set to an EntryDescriptor which relies on the given entry_type for behavior.

Note this means you cannot call this macro twice in the same executable, as the produced symbols will conflict.

§Example

This example exposes a custom MyEntry entry type. See the Entry trait documentation for an example of how to actually implement it.

use std::ffi::CStr;
use clack_plugin::entry::prelude::*;
use clack_plugin::prelude::*;

pub struct MyEntry;

impl Entry for MyEntry {
    /* ... */
}

// The host will now see and use this entry.
clack_export_entry!(MyEntry);