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" version = "0.2.0"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"livi",
"palette", "palette",
"rand", "rand",
"tek_jack", "tek_jack",
"tek_midi", "tek_midi",
"tek_plugin",
"tek_sampler", "tek_sampler",
"tek_time", "tek_time",
"tek_tui", "tek_tui",
@ -1474,6 +1474,17 @@ dependencies = [
"tek_tui", "tek_tui",
] ]
[[package]]
name = "tek_plugin"
version = "0.2.0"
dependencies = [
"livi",
"tek_jack",
"tek_midi",
"tek_time",
"tek_tui",
]
[[package]] [[package]]
name = "tek_sampler" name = "tek_sampler"
version = "0.2.0" version = "0.2.0"

View file

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

View file

@ -14,7 +14,7 @@ test:
cargo test cargo test
cloc: 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: status:
cargo c 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::*; use crate::*;
pub mod lv2; pub(crate) use lv2::*;
pub use self::lv2::LV2Plugin;
/// A plugin device. /// A plugin device.
#[derive(Debug)] #[derive(Debug)]
pub struct Plugin { pub struct Plugin {

View file

@ -1,6 +1,8 @@
mod sampler; pub use self::sampler::*; mod sampler; pub use self::sampler::*;
mod sampler_tui; pub use self::sampler_tui::*; 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::{ pub(crate) use ::tek_tui::{
*, *,
tek_output::*, tek_output::*,
@ -9,8 +11,6 @@ pub(crate) use ::tek_tui::{
ratatui::prelude::*, ratatui::prelude::*,
crossterm::event::*, 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::sync::{Arc, RwLock, atomic::{AtomicUsize, Ordering::Relaxed}};
pub(crate) use std::fs::File; pub(crate) use std::fs::File;

View file

@ -9,18 +9,12 @@ tek_jack = { path = "../jack" }
tek_time = { path = "../time" } tek_time = { path = "../time" }
tek_midi = { path = "../midi" } tek_midi = { path = "../midi" }
tek_sampler = { path = "../sampler" } tek_sampler = { path = "../sampler" }
tek_plugin = { path = "../plugin" }
backtrace = "0.3.72" backtrace = "0.3.72"
livi = "0.7.4"
palette = { version = "0.7.6", features = [ "random" ] } palette = { version = "0.7.6", features = [ "random" ] }
rand = "0.8.5" rand = "0.8.5"
toml = "0.8.12" 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] [features]
default = [] default = []

View file

@ -14,7 +14,6 @@ pub mod app; pub use self::app::*;
pub mod arranger; pub use self::arranger::*; pub mod arranger; pub use self::arranger::*;
pub mod groovebox; pub use self::groovebox::*; pub mod groovebox; pub use self::groovebox::*;
pub mod mixer; pub use self::mixer::*; pub mod mixer; pub use self::mixer::*;
pub mod plugin; pub use self::plugin::*;
pub mod pool; pub use self::pool::*; pub mod pool; pub use self::pool::*;
pub mod sequencer; pub use self::sequencer::*; 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_jack; pub use ::tek_jack::{*, jack::{*, contrib::*}};
pub use ::tek_midi; pub use ::tek_midi::{*, midly::{*, num::*, live::*}}; pub use ::tek_midi; pub use ::tek_midi::{*, midly::{*, num::*, live::*}};
pub use ::tek_sampler::{self, *}; pub use ::tek_sampler::{self, *};
pub use ::tek_plugin::{self, *};
pub use ::tek_tui::{ pub use ::tek_tui::{
*, *,
tek_edn::*, tek_edn::*,