commit ec295f3693ed9de869bd43d5d4d67869fd4f9d16 Author: Nikolai Rodionov Date: Thu Aug 14 17:29:29 2025 +0200 Init Commit Signed-off-by: Nikolai Rodionov diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..feaa282 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "plugin-manager" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100644 index 0000000..16d2db2 --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "cli" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/cli/src/main.rs b/cli/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/gui/Cargo.toml b/gui/Cargo.toml new file mode 100644 index 0000000..cf794ba --- /dev/null +++ b/gui/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "plugin-manager-gui" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/gui/src/main.rs b/gui/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/gui/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/lib/Cargo.lock b/lib/Cargo.lock new file mode 100644 index 0000000..d675ebc --- /dev/null +++ b/lib/Cargo.lock @@ -0,0 +1,228 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "lib" +version = "0.1.0" +dependencies = [ + "dirs", +] + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libredox" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +dependencies = [ + "bitflags", + "libc", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "proc-macro2" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "syn" +version = "2.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bc3fcb250e53458e712715cf74285c1f889686520d79294a9ef3bd7aa1fc619" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" diff --git a/lib/Cargo.toml b/lib/Cargo.toml new file mode 100644 index 0000000..3dd9c2b --- /dev/null +++ b/lib/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "lib" +version = "0.1.0" +edition = "2024" + +[dependencies] +dirs = "6.0.0" diff --git a/lib/config.yaml b/lib/config.yaml new file mode 100644 index 0000000..a850c72 --- /dev/null +++ b/lib/config.yaml @@ -0,0 +1,6 @@ +dirs: + cache_path: ~/.cache + collections_path: ~/.cache +paths: + vst3: ~/.vst3 + clap: ~/.clap diff --git a/lib/repo.yaml b/lib/repo.yaml new file mode 100644 index 0000000..4dd8f5b --- /dev/null +++ b/lib/repo.yaml @@ -0,0 +1,22 @@ +--- +# collection +name: Test collection +description: | + This collection is supposed to be used only for testing purposes +files: + - ./aviary_plugins/hamburger.yaml +--- +# aviary_plugins/hamburger.yaml +name: Hamburger +developer: Aviary Plugins +description: | + Hamburger is a distortion plugin with inbuilt dynamics controls and equalisation that can deliver both subtle tangy harmonics and absolute annilhilation and noise-wall-ification to any sound. +versions: + - version: "0.5" + format: vst3 + downloads: + - os: macos + url: https://github.com/Davit-G/Hamburger/releases/download/v{{ .version }}/Hamburger.v{{ .version }}.MacOS.Universal.zip + handler: + zip: + path: ./test.vst diff --git a/lib/src/collection.rs b/lib/src/collection.rs new file mode 100644 index 0000000..6e1267d --- /dev/null +++ b/lib/src/collection.rs @@ -0,0 +1,12 @@ +pub struct Collection { + name: String, + description: String, + files: Vec, +} + +pub fn add_collection(path: String) { + if path.starts_with("file") { + println!("Reading a file"); + } +} + diff --git a/lib/src/config.rs b/lib/src/config.rs new file mode 100644 index 0000000..ed227bc --- /dev/null +++ b/lib/src/config.rs @@ -0,0 +1,37 @@ +use std::{fmt, fs::create_dir_all, path::PathBuf}; + +pub struct Config { +} + +pub struct Dirs { + cache_path: String, + colletions_path: String, +} + +impl Default for Dirs { + fn default() -> Self { + + + let collection_path = match dirs::data_dir() { + Some(path) => { + match path.as_path() { + + } + }, + None => panic!("I don't know what to do with the path"), + } + let cache_path = format!("{}/plux", dirs::cache_dir()); + let collections_path = ; + Self { cache_path, colletions_path } + } +} + +pub(crate) fn read_config() -> Result { + let config_dir = format!("{}/plux", dirs::config_dir()); + let config_file = "config.toml"; + + create_dir_all(config_dir)?; +} + +// If config doesn't exist, create a default one + diff --git a/lib/src/handlers.rs b/lib/src/handlers.rs new file mode 100644 index 0000000..b7a5c8d --- /dev/null +++ b/lib/src/handlers.rs @@ -0,0 +1,3 @@ +mod zip; + +pub trait Handler {} diff --git a/lib/src/handlers/zip.rs b/lib/src/handlers/zip.rs new file mode 100644 index 0000000..05926c8 --- /dev/null +++ b/lib/src/handlers/zip.rs @@ -0,0 +1,5 @@ +pub struct Zip { + path: String, +} + +impl super::Handler for Zip {} diff --git a/lib/src/lib.rs b/lib/src/lib.rs new file mode 100644 index 0000000..d60d334 --- /dev/null +++ b/lib/src/lib.rs @@ -0,0 +1,34 @@ +mod handlers; +mod collection; +mod config; + +pub struct Plugin { + name: String, + description: String, + developer: String, + versions: Vec, +} + +pub struct Version { + version: String, + //TODO: Should be enum + format: String, + url: String, + //TODO: Might be not the best option + handler: Option>, +} + +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}