extract plugin crate

This commit is contained in:
🪞👃🪞 2025-01-11 22:23:58 +01:00
parent 1f10c95ed0
commit 8c6716adce
14 changed files with 53 additions and 15 deletions

13
Cargo.lock generated
View file

@ -1414,11 +1414,11 @@ name = "tek"
version = "0.2.0"
dependencies = [
"backtrace",
"livi",
"palette",
"rand",
"tek_jack",
"tek_midi",
"tek_plugin",
"tek_sampler",
"tek_time",
"tek_tui",
@ -1474,6 +1474,17 @@ dependencies = [
"tek_tui",
]
[[package]]
name = "tek_plugin"
version = "0.2.0"
dependencies = [
"livi",
"tek_jack",
"tek_midi",
"tek_time",
"tek_tui",
]
[[package]]
name = "tek_sampler"
version = "0.2.0"

View file

@ -7,6 +7,7 @@ members = [
"./jack",
"./midi",
"./output",
"./plugin",
"./sampler",
"./tek",
"./time",

View file

@ -14,7 +14,7 @@ test:
cargo test
cloc:
for src in {cli,edn/src,input/src,jack/src,midi/src,output/src,tek/src,time/src,tui/src}; do echo; echo $src; cloc --quiet $src; done
for src in {cli,edn/src,input/src,jack/src,midi/src,output/src,plugin/src,sampler/src,tek/src,time/src,tui/src}; do echo; echo $src; cloc --quiet $src; done
status:
cargo c

18
plugin/Cargo.toml Normal file
View file

@ -0,0 +1,18 @@
[package]
name = "tek_plugin"
edition = "2021"
version = "0.2.0"
[dependencies]
tek_tui = { path = "../tui" }
tek_jack = { path = "../jack" }
tek_time = { path = "../time" }
tek_midi = { path = "../midi" }
livi = "0.7.4"
#once_cell = "1.19.0"
#no_deadlocks = "1.3.2"
#suil-rs = { path = "../suil" }
#vst = "0.4.0"
#vst3 = "0.1.0"
#winit = { version = "0.30.4", features = [ "x11" ] }

17
plugin/src/lib.rs Normal file
View file

@ -0,0 +1,17 @@
mod plugin; pub use self::plugin::*;
mod lv2; pub use self::lv2::*;
pub(crate) use ::tek_jack::{*, jack::*};
pub(crate) use ::tek_tui::{
*,
tek_output::*,
tek_input::*,
tek_edn::*,
ratatui::prelude::*,
crossterm::event::*,
};
pub(crate) use std::cmp::Ord;
pub(crate) use std::fmt::{Debug, Formatter};
pub(crate) use std::sync::{Arc, RwLock};
pub(crate) use std::thread::JoinHandle;

View file

@ -1,8 +1,5 @@
use crate::*;
pub mod lv2; pub(crate) use lv2::*;
pub use self::lv2::LV2Plugin;
/// A plugin device.
#[derive(Debug)]
pub struct Plugin {

View file

@ -1,6 +1,8 @@
mod sampler; pub use self::sampler::*;
mod sampler_tui; pub use self::sampler_tui::*;
pub(crate) use ::tek_jack::{*, jack::*};
pub(crate) use ::tek_midi::{*, midly::{*, live::*, num::*}};
pub(crate) use ::tek_tui::{
*,
tek_output::*,
@ -9,8 +11,6 @@ pub(crate) use ::tek_tui::{
ratatui::prelude::*,
crossterm::event::*,
};
pub(crate) use ::tek_jack::{*, jack::*};
pub(crate) use ::tek_midi::{*, midly::{*, live::*, num::*}};
pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicUsize, Ordering::Relaxed}};
pub(crate) use std::fs::File;

View file

@ -9,18 +9,12 @@ tek_jack = { path = "../jack" }
tek_time = { path = "../time" }
tek_midi = { path = "../midi" }
tek_sampler = { path = "../sampler" }
tek_plugin = { path = "../plugin" }
backtrace = "0.3.72"
livi = "0.7.4"
palette = { version = "0.7.6", features = [ "random" ] }
rand = "0.8.5"
toml = "0.8.12"
#once_cell = "1.19.0"
#no_deadlocks = "1.3.2"
#suil-rs = { path = "../suil" }
#vst = "0.4.0"
#vst3 = "0.1.0"
#winit = { version = "0.30.4", features = [ "x11" ] }
[features]
default = []

View file

@ -14,7 +14,6 @@ pub mod app; pub use self::app::*;
pub mod arranger; pub use self::arranger::*;
pub mod groovebox; pub use self::groovebox::*;
pub mod mixer; pub use self::mixer::*;
pub mod plugin; pub use self::plugin::*;
pub mod pool; pub use self::pool::*;
pub mod sequencer; pub use self::sequencer::*;
@ -22,6 +21,7 @@ pub use ::tek_time; pub use ::tek_time::*;
pub use ::tek_jack; pub use ::tek_jack::{*, jack::{*, contrib::*}};
pub use ::tek_midi; pub use ::tek_midi::{*, midly::{*, num::*, live::*}};
pub use ::tek_sampler::{self, *};
pub use ::tek_plugin::{self, *};
pub use ::tek_tui::{
*,
tek_edn::*,