1
0
Fork 0
nih-plug/nih_plug_derive/src/lib.rs

17 lines
533 B
Rust
Raw Normal View History

2022-01-25 19:55:01 +01:00
use proc_macro::TokenStream;
mod enums;
mod params;
2022-02-14 16:16:05 +01:00
/// Derive the `Enum` trait for your simple enum parameters. See `EnumParam` for more information.
2022-02-14 16:16:05 +01:00
#[proc_macro_derive(Enum, attributes(name))]
pub fn derive_enum(input: TokenStream) -> TokenStream {
enums::derive_enum(input)
}
2022-02-14 16:16:05 +01:00
/// 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)
2022-02-14 16:16:05 +01:00
}