1
0
Fork 0
nih-plug/nih_plug_derive/src/lib.rs
2022-06-03 22:22:36 +02:00

17 lines
532 B
Rust

use proc_macro::TokenStream;
mod enums;
mod params;
/// Derive the `Enum` trait for simple enum parameters. See `EnumParam` for more information.
#[proc_macro_derive(Enum, attributes(name, id))]
pub fn derive_enum(input: TokenStream) -> TokenStream {
enums::derive_enum(input)
}
/// Derive the `Params` trait for your plugin's parameters struct. See the `Plugin` trait.
#[proc_macro_derive(Params, attributes(id, persist, nested))]
pub fn derive_params(input: TokenStream) -> TokenStream {
params::derive_params(input)
}