make tek_plugin optional

This commit is contained in:
🪞👃🪞 2025-04-19 01:20:48 +03:00
parent c439528cfc
commit 414650da31
4 changed files with 8 additions and 3 deletions

View file

@ -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" }

View file

@ -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"]

View file

@ -1,6 +1,10 @@
use crate::*;
pub trait Device: Send + Sync + std::fmt::Debug {
fn boxed <'a> (self) -> Box<dyn Device + 'a> where Self: Sized + 'a { Box::new(self) }
}
impl Device for Sampler {}
#[cfg(feature = "host")]
impl Device for Plugin {}

View file

@ -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::*;