diff --git a/Cargo.toml b/Cargo.toml index 0b28a266..8fdf329f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ tek = { path = "./app" } tek_cli = { path = "./cli" } tek_jack = { path = "./jack" } tek_midi = { path = "./midi" } -tek_plugin = { path = "./plugin" } +tek_plugin = { path = "./plugin", default-features = false } tek_sampler = { path = "./sampler" } tek_time = { path = "./time" } diff --git a/app/Cargo.toml b/app/Cargo.toml index 2ecf022d..8126fa54 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -10,7 +10,7 @@ tek_jack = { workspace = true } tek_time = { workspace = true } tek_midi = { workspace = true } tek_sampler = { workspace = true } -tek_plugin = { workspace = true } +tek_plugin = { workspace = true, optional = true } backtrace = { workspace = true } clap = { workspace = true, optional = true } @@ -25,3 +25,4 @@ proptest-derive = { workspace = true } [features] default = ["cli"] cli = ["clap"] +host = ["tek_plugin"] diff --git a/app/src/device.rs b/app/src/device.rs index 1179f97c..c9db7a79 100644 --- a/app/src/device.rs +++ b/app/src/device.rs @@ -1,6 +1,10 @@ use crate::*; + pub trait Device: Send + Sync + std::fmt::Debug { fn boxed <'a> (self) -> Box where Self: Sized + 'a { Box::new(self) } } + impl Device for Sampler {} + +#[cfg(feature = "host")] impl Device for Plugin {} diff --git a/app/src/lib.rs b/app/src/lib.rs index d0a9b9e9..e7d7e790 100644 --- a/app/src/lib.rs +++ b/app/src/lib.rs @@ -22,7 +22,7 @@ pub use ::tek_time::{self, *}; pub use ::tek_jack::{self, *, jack::*}; pub use ::tek_midi::{self, *, midly::{MidiMessage, num::*, live::*}}; pub use ::tek_sampler::{self, *}; -pub use ::tek_plugin::{self, *}; +#[cfg(feature = "host")] pub use ::tek_plugin::{self, *}; pub use ::tengri::dsl::*; pub use ::tengri::input::*; pub use ::tengri::output::*;