From c3f8b8fb8c7ebf7850f2c17c955f018fa8f2f703 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 26 Jan 2022 12:50:30 +0100 Subject: [PATCH] Re-export the nih_plug_derive macro No need to have to use this crate separately. --- Cargo.lock | 2 +- nih_plug/Cargo.toml | 1 + nih_plug/src/lib.rs | 3 +++ plugins/gain/Cargo.toml | 7 +------ plugins/gain/src/lib.rs | 1 - 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04ab34d2..ce6e7ef7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,13 +7,13 @@ name = "gain" version = "0.1.0" dependencies = [ "nih_plug", - "nih_plug_derive", ] [[package]] name = "nih_plug" version = "0.1.0" dependencies = [ + "nih_plug_derive", "vst3-sys", ] diff --git a/nih_plug/Cargo.toml b/nih_plug/Cargo.toml index f4ebbaef..62187f5d 100644 --- a/nih_plug/Cargo.toml +++ b/nih_plug/Cargo.toml @@ -6,4 +6,5 @@ authors = ["Robbert van der Helm "] license = "GPL-3.0-or-later" [dependencies] +nih_plug_derive = { path = "../nih_plug_derive" } vst3-sys = { git = "https://github.com/RustAudio/vst3-sys.git" } diff --git a/nih_plug/src/lib.rs b/nih_plug/src/lib.rs index 4e2d515d..781aa164 100644 --- a/nih_plug/src/lib.rs +++ b/nih_plug/src/lib.rs @@ -19,3 +19,6 @@ pub mod params; pub mod plugin; pub mod util; pub mod wrapper; + +// Re-export our derive macros to make this a bit easier to use +pub use nih_plug_derive::Params; diff --git a/plugins/gain/Cargo.toml b/plugins/gain/Cargo.toml index 1146863a..fd68906e 100644 --- a/plugins/gain/Cargo.toml +++ b/plugins/gain/Cargo.toml @@ -7,9 +7,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] - -[dependencies.nih_plug] -path = "../../nih_plug" - -[dependencies.nih_plug_derive] -path = "../../nih_plug_derive" +nih_plug = { path = "../../nih_plug" } diff --git a/plugins/gain/src/lib.rs b/plugins/gain/src/lib.rs index 15c61576..b741f7e4 100644 --- a/plugins/gain/src/lib.rs +++ b/plugins/gain/src/lib.rs @@ -22,7 +22,6 @@ use nih_plug::{ plugin::{BufferConfig, BusConfig, Plugin}, util, }; -use nih_plug_derive::Params; use std::pin::Pin; struct Gain {