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

17 lines
532 B
Rust
Raw Normal View History

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