From dacce119c4a3424c3c2a0e54b0f39dec15f69e47 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Wed, 24 Jul 2024 13:21:11 +0300 Subject: [PATCH] convert to workspace, add suil bindings crate --- Cargo.lock | 1396 ++++++++++++++++- Cargo.toml | 37 +- README.md | 1 + crates/suil/Cargo.toml | 9 + crates/suil/build.rs | 18 + crates/suil/src/bound.rs | 5 + crates/suil/src/lib.rs | 72 + crates/suil/wrapper.h | 302 ++++ crates/tek/Cargo.toml | 39 + {src => crates/tek/src}/cli.rs | 0 {src => crates/tek/src}/config.rs | 0 {src => crates/tek/src}/control.rs | 0 {src => crates/tek/src}/core.rs | 0 {src => crates/tek/src}/core/handle.rs | 0 {src => crates/tek/src}/core/midi.rs | 0 {src => crates/tek/src}/core/render.rs | 0 {src => crates/tek/src}/core/time.rs | 0 {src => crates/tek/src}/devices.rs | 0 {src => crates/tek/src}/devices/arranger.rs | 0 .../tek/src}/devices/arranger/arr_draw_h.rs | 0 .../tek/src}/devices/arranger/arr_draw_v.rs | 0 .../tek/src}/devices/arranger/arr_focus.rs | 0 .../tek/src}/devices/arranger/arr_phrase.rs | 0 .../tek/src}/devices/arranger/arr_scene.rs | 0 .../tek/src}/devices/arranger/arr_track.rs | 0 {src => crates/tek/src}/devices/chain.rs | 0 {src => crates/tek/src}/devices/help.rs | 0 {src => crates/tek/src}/devices/looper.rs | 0 {src => crates/tek/src}/devices/mixer.rs | 0 {src => crates/tek/src}/devices/plugin.rs | 102 +- crates/tek/src/devices/plugin/lv2.rs | 123 ++ {src => crates/tek/src}/devices/sampler.rs | 0 .../tek/src}/devices/sampler/add_sample.rs | 0 .../tek/src}/devices/sampler/sample.rs | 0 .../tek/src}/devices/sampler/voice.rs | 0 {src => crates/tek/src}/devices/sequencer.rs | 0 {src => crates/tek/src}/devices/setup.rs | 0 {src => crates/tek/src}/devices/transport.rs | 0 {src => crates/tek/src}/edn.rs | 0 {src => crates/tek/src}/jack.rs | 0 {src => crates/tek/src}/jack/device.rs | 0 {src => crates/tek/src}/jack/event.rs | 0 {src => crates/tek/src}/jack/factory.rs | 0 {src => crates/tek/src}/jack/ports.rs | 0 {src => crates/tek/src}/main.rs | 2 +- {src => crates/tek/src}/model.rs | 0 {src => crates/tek/src}/view.rs | 0 {src => crates/tek/src}/view/border.rs | 0 {src => crates/tek/src}/view/split.rs | 0 {src => crates/tek/src}/view/theme.rs | 0 demos/project.edn | 1 + shell.nix | 3 + 52 files changed, 1994 insertions(+), 116 deletions(-) create mode 100644 crates/suil/Cargo.toml create mode 100644 crates/suil/build.rs create mode 100644 crates/suil/src/bound.rs create mode 100644 crates/suil/src/lib.rs create mode 100644 crates/suil/wrapper.h create mode 100644 crates/tek/Cargo.toml rename {src => crates/tek/src}/cli.rs (100%) rename {src => crates/tek/src}/config.rs (100%) rename {src => crates/tek/src}/control.rs (100%) rename {src => crates/tek/src}/core.rs (100%) rename {src => crates/tek/src}/core/handle.rs (100%) rename {src => crates/tek/src}/core/midi.rs (100%) rename {src => crates/tek/src}/core/render.rs (100%) rename {src => crates/tek/src}/core/time.rs (100%) rename {src => crates/tek/src}/devices.rs (100%) rename {src => crates/tek/src}/devices/arranger.rs (100%) rename {src => crates/tek/src}/devices/arranger/arr_draw_h.rs (100%) rename {src => crates/tek/src}/devices/arranger/arr_draw_v.rs (100%) rename {src => crates/tek/src}/devices/arranger/arr_focus.rs (100%) rename {src => crates/tek/src}/devices/arranger/arr_phrase.rs (100%) rename {src => crates/tek/src}/devices/arranger/arr_scene.rs (100%) rename {src => crates/tek/src}/devices/arranger/arr_track.rs (100%) rename {src => crates/tek/src}/devices/chain.rs (100%) rename {src => crates/tek/src}/devices/help.rs (100%) rename {src => crates/tek/src}/devices/looper.rs (100%) rename {src => crates/tek/src}/devices/mixer.rs (100%) rename {src => crates/tek/src}/devices/plugin.rs (74%) create mode 100644 crates/tek/src/devices/plugin/lv2.rs rename {src => crates/tek/src}/devices/sampler.rs (100%) rename {src => crates/tek/src}/devices/sampler/add_sample.rs (100%) rename {src => crates/tek/src}/devices/sampler/sample.rs (100%) rename {src => crates/tek/src}/devices/sampler/voice.rs (100%) rename {src => crates/tek/src}/devices/sequencer.rs (100%) rename {src => crates/tek/src}/devices/setup.rs (100%) rename {src => crates/tek/src}/devices/transport.rs (100%) rename {src => crates/tek/src}/edn.rs (100%) rename {src => crates/tek/src}/jack.rs (100%) rename {src => crates/tek/src}/jack/device.rs (100%) rename {src => crates/tek/src}/jack/event.rs (100%) rename {src => crates/tek/src}/jack/factory.rs (100%) rename {src => crates/tek/src}/jack/ports.rs (100%) rename {src => crates/tek/src}/main.rs (96%) rename {src => crates/tek/src}/model.rs (100%) rename {src => crates/tek/src}/view.rs (100%) rename {src => crates/tek/src}/view/border.rs (100%) rename {src => crates/tek/src}/view/split.rs (100%) rename {src => crates/tek/src}/view/theme.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 9f0ca113..5aff4301 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79faae4620f45232f599d9bc7b290f88247a0834162c4495ab2f02d60004adfb" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "addr2line" version = "0.22.0" @@ -24,17 +40,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", ] +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + [[package]] name = "allocator-api2" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.5.0", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.7.2", + "thiserror", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "anstream" version = "0.6.14" @@ -84,12 +137,30 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "arrayref" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" + [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atomic_float" version = "1.0.0" @@ -133,6 +204,29 @@ dependencies = [ "console", ] +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.60", + "which", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -145,12 +239,59 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + [[package]] name = "bytemuck" version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +[[package]] +name = "bytes" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.5.0", + "log", + "polling", + "rustix", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cassowary" version = "0.3.0" @@ -171,6 +312,26 @@ name = "cc" version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -178,6 +339,23 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading 0.8.5", +] + [[package]] name = "clap" version = "4.5.4" @@ -242,6 +420,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "compact_str" version = "0.7.1" @@ -255,6 +443,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "console" version = "0.15.8" @@ -273,6 +470,46 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa" +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "crossbeam-deque" version = "0.8.5" @@ -323,6 +560,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + [[package]] name = "dasp" version = "0.11.0" @@ -442,6 +685,33 @@ dependencies = [ "dasp_sample", ] +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.5", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + [[package]] name = "either" version = "1.12.0" @@ -469,12 +739,49 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "extended" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365" +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "fraction" version = "0.15.3" @@ -485,12 +792,39 @@ dependencies = [ "num", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "gimli" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "hashbrown" version = "0.14.5" @@ -507,6 +841,21 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "indexmap" version = "2.2.6" @@ -569,16 +918,62 @@ dependencies = [ "bitflags 1.3.2", "lazy_static", "libc", - "libloading", + "libloading 0.7.4", "pkg-config", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.154" @@ -595,6 +990,27 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.5.0", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "lilv" version = "0.2.2" @@ -616,6 +1032,12 @@ dependencies = [ "lv2_raw", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "livi" version = "0.7.4" @@ -675,6 +1097,15 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "microxdg" version = "0.1.2" @@ -690,6 +1121,12 @@ dependencies = [ "rayon", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.3" @@ -720,6 +1157,46 @@ dependencies = [ "num-traits", ] +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.5.0", + "jni-sys", + "log", + "ndk-sys", + "num_enum 0.7.2", + "raw-window-handle", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num" version = "0.4.3" @@ -799,7 +1276,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", ] [[package]] @@ -814,6 +1300,221 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.5.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.5.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + [[package]] name = "object" version = "0.35.0" @@ -829,6 +1530,15 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "orbclient" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +dependencies = [ + "libredox", +] + [[package]] name = "ordered-float" version = "4.2.1" @@ -838,6 +1548,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "owned_ttf_parser" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" +dependencies = [ + "ttf-parser", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -892,12 +1611,69 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "polling" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.60", +] + [[package]] name = "primal-check" version = "0.3.4" @@ -926,6 +1702,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quick-xml" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.36" @@ -964,6 +1749,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + [[package]] name = "rayon" version = "1.10.0" @@ -1002,6 +1793,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.5.1" @@ -1011,6 +1811,35 @@ dependencies = [ "bitflags 2.5.0", ] +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + [[package]] name = "ringbuf" version = "0.3.3" @@ -1050,6 +1879,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustfft" version = "6.2.0" @@ -1065,6 +1900,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustversion" version = "1.0.17" @@ -1077,12 +1925,40 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + [[package]] name = "serde" version = "1.0.203" @@ -1112,6 +1988,12 @@ dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -1142,12 +2024,55 @@ dependencies = [ "libc", ] +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.5.0", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + [[package]] name = "stability" version = "0.2.0" @@ -1170,6 +2095,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + [[package]] name = "strsim" version = "0.11.1" @@ -1198,6 +2129,13 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "suil" +version = "0.1.0" +dependencies = [ + "bindgen", +] + [[package]] name = "svgbobdoc" version = "0.3.0" @@ -1450,10 +2388,12 @@ dependencies = [ "ratatui", "rlsf", "rubato", + "suil", "symphonia", "toml", "vst", "wavers", + "winit", ] [[package]] @@ -1476,6 +2416,31 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "toml" version = "0.8.14" @@ -1521,6 +2486,22 @@ dependencies = [ "winnow 0.6.13", ] +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + [[package]] name = "transpose" version = "0.2.3" @@ -1531,6 +2512,12 @@ dependencies = [ "strength_reduce", ] +[[package]] +name = "ttf-parser" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8686b91785aff82828ed725225925b33b4fde44c4bb15876e5f7c832724c420a" + [[package]] name = "unicode-ident" version = "1.0.12" @@ -1579,10 +2566,20 @@ checksum = "caf1ddbb85e53de6c1534f97340b065ca127678dcc31f88a33b93e54a5ac38dc" dependencies = [ "bitflags 1.3.2", "libc", - "libloading", + "libloading 0.7.4", "log", "num-traits", - "num_enum", + "num_enum 0.5.11", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", ] [[package]] @@ -1591,6 +2588,72 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.60", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + [[package]] name = "wavers" version = "1.4.3" @@ -1603,6 +2666,147 @@ dependencies = [ "thiserror", ] +[[package]] +name = "wayland-backend" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" +dependencies = [ + "cc", + "downcast-rs", + "rustix", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" +dependencies = [ + "bitflags 2.5.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.5.0", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef9489a8df197ebf3a8ce8a7a7f0a2320035c3743f3c1bd0bdbccf07ce64f95" +dependencies = [ + "rustix", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62989625a776e827cc0f15d41444a3cea5205b963c3a25be48ae1b52d6b4daaa" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f79f2d57c7fcc6ab4d602adba364bf59a5c24de57bd194486bf9b8360e06bfc4" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd993de54a40a40fbe5601d9f1fbcaef0aebcc5fda447d7dc8f6dcbaae4f8953" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1619,12 +2823,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -1643,6 +2865,21 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -1674,6 +2911,12 @@ dependencies = [ "windows_x86_64_msvc 0.52.5", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -1686,6 +2929,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -1698,6 +2947,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -1716,6 +2971,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -1728,6 +2989,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -1740,6 +3007,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -1752,6 +3025,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -1764,6 +3043,58 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +[[package]] +name = "winit" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4225ddd8ab67b8b59a2fee4b34889ebf13c0460c1c3fa297c58e21eb87801b33" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.5.0", + "block2", + "bytemuck", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + [[package]] name = "winnow" version = "0.5.40" @@ -1782,6 +3113,63 @@ dependencies = [ "memchr", ] +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.5", + "once_cell", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "xcursor" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d491ee231a51ae64a5b762114c3ac2104b967aadba1de45c86ca42cf051513b7" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.5.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + [[package]] name = "zerocopy" version = "0.7.34" diff --git a/Cargo.toml b/Cargo.toml index e6698897..21567f23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,34 +1,3 @@ -[package] -name = "tek" -edition = "2021" -version = "0.1.0" - -[dependencies] -jack = "0.10" -clap = { version = "4.5.4", features = [ "derive" ] } -crossterm = "0.27" -ratatui = { version = "0.26.3", features = [ "unstable-widget-ref", "underline-color" ] } -backtrace = "0.3.72" -microxdg = "0.1.2" -toml = "0.8.12" -better-panic = "0.3.0" -midly = "0.5" - -vst = "0.4.0" -#vst3 = "0.1.0" -livi = "0.7.4" -#atomic_enum = "0.3.0" -wavers = "1.4.3" -music-math = "0.1.1" -atomic_float = "1.0.0" -fraction = "0.15.3" -rlsf = "0.2.1" -r8brain-rs = "0.3.5" -clojure-reader = "0.1.0" -once_cell = "1.19.0" - -symphonia = { version = "0.5.4", features = [ "all" ] } - -dasp = { version = "0.11.0", features = [ "all" ] } - -rubato = "0.15.0" +[workspace] +resolver = "2" +members = [ "crates/*" ] diff --git a/README.md b/README.md index 20e3ee9b..5dc80d11 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Ardour, and probably others. The main view consists of three sections: * [ ] Pattern chain * [ ] Actually sync * Chain: + * [ ] Add device * [ ] View and connect device ports in chain view * [ ] Open LV2 GUI * [ ] Pin favorite FX parameters with `*` diff --git a/crates/suil/Cargo.toml b/crates/suil/Cargo.toml new file mode 100644 index 00000000..648da4a2 --- /dev/null +++ b/crates/suil/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "suil" +version = "0.1.0" +edition = "2021" + +[dependencies] + +[build-dependencies] +bindgen = "0.69.4" diff --git a/crates/suil/build.rs b/crates/suil/build.rs new file mode 100644 index 00000000..a534f9e9 --- /dev/null +++ b/crates/suil/build.rs @@ -0,0 +1,18 @@ +use std::path::PathBuf; +use std::env::var; +use bindgen::{Builder, CargoCallbacks}; +fn main() { + //println!("cargo:rustc-link-lib=lv2"); + //println!("cargo:rustc-link-lib=suil"); + let bindings = Builder::default() + .header("wrapper.h") + .clang_arg("-Ilv2/include/lv2") + .clang_arg("-Isuil/include/suil") + .parse_callbacks(Box::new(CargoCallbacks::new())) + .generate() + .expect("Unable to generate bindings"); + let out_path = PathBuf::from(var("OUT_DIR").unwrap()); + bindings + .write_to_file(out_path.join("bindings.rs")) + .expect("Couldn't write bindings!"); +} diff --git a/crates/suil/src/bound.rs b/crates/suil/src/bound.rs new file mode 100644 index 00000000..a38a13a8 --- /dev/null +++ b/crates/suil/src/bound.rs @@ -0,0 +1,5 @@ +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] + +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/crates/suil/src/lib.rs b/crates/suil/src/lib.rs new file mode 100644 index 00000000..7dfcdc6b --- /dev/null +++ b/crates/suil/src/lib.rs @@ -0,0 +1,72 @@ +use std::ffi::CString; + +pub mod bound; + +pub struct Host(*mut self::bound::SuilHost); + +pub struct Instance(*mut self::bound::SuilInstance); + +pub struct Controller(*mut self::bound::SuilController); + +impl Host { + fn new () -> Self { + //let write = std::ptr::null(); + //let index = std::ptr::null(); + //let subscribe = std::ptr::null(); + //let unsubscribe = std::ptr::null(); + Self(unsafe { + bound::suil_init(&mut 0, std::ptr::null_mut(), 0); + bound::suil_host_new(None, None, None, None) + }) + } + fn set_touch_func (&self) { + unimplemented!(); + } + fn instance ( + &self, + controller: &Controller, + container_type_uri: &str, + plugin_uri: &str, + ui_uri: &str, + ui_type_uri: &str, + ui_bundle_path: &str, + ui_binary_path: &str, + features: &[*const bound::LV2_Feature], + ) -> Result> { + let container_type_uri = CString::new(container_type_uri)?; + let plugin_uri = CString::new(plugin_uri)?; + let ui_uri = CString::new(ui_uri)?; + let ui_type_uri = CString::new(ui_type_uri)?; + let ui_bundle_path = CString::new(ui_bundle_path)?; + let ui_binary_path = CString::new(ui_binary_path)?; + Ok(Instance(unsafe { + bound::suil_instance_new( + self.0, + *controller.0, + container_type_uri.into_raw(), + plugin_uri.into_raw(), + ui_uri.into_raw(), + ui_type_uri.into_raw(), + ui_bundle_path.into_raw(), + ui_binary_path.into_raw(), + features.as_ptr() + ) + })) + } +} + +impl Drop for Host { + fn drop (&mut self) -> () { + unsafe { + bound::suil_host_free(self.0) + } + } +} + +impl Drop for Instance { + fn drop (&mut self) -> () { + unsafe { + bound::suil_instance_free(self.0) + } + } +} diff --git a/crates/suil/wrapper.h b/crates/suil/wrapper.h new file mode 100644 index 00000000..ba55a910 --- /dev/null +++ b/crates/suil/wrapper.h @@ -0,0 +1,302 @@ +// Copyright 2011-2017 David Robillard +// SPDX-License-Identifier: ISC + +/// @file suil.h Public API for Suil + +#ifndef SUIL_SUIL_H +#define SUIL_SUIL_H + +#include "lv2/core/lv2.h" + +#include +#include + +// SUIL_LIB_IMPORT and SUIL_LIB_EXPORT mark the entry points of shared libraries +#ifdef _WIN32 +# define SUIL_LIB_IMPORT __declspec(dllimport) +# define SUIL_LIB_EXPORT __declspec(dllexport) +#else +# define SUIL_LIB_IMPORT __attribute__((visibility("default"))) +# define SUIL_LIB_EXPORT __attribute__((visibility("default"))) +#endif + +// SUIL_API exposes symbols in the public API +#ifndef SUIL_API +# ifdef SUIL_STATIC +# define SUIL_API +# elif defined(SUIL_INTERNAL) +# define SUIL_API SUIL_LIB_EXPORT +# else +# define SUIL_API SUIL_LIB_IMPORT +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** + @defgroup suil Suil C API + @{ +*/ + +/** + @defgroup suil_callbacks Callbacks + @{ +*/ + +/** + UI controller. + + This is an opaque pointer passed by the user which is passed to the various + UI control functions (e.g. SuilPortWriteFunc). It is typically used to pass + a pointer to some controller object the host uses to communicate with + plugins. +*/ +typedef void* SuilController; + +/// Function to write/send a value to a port +typedef void (*SuilPortWriteFunc)( // + SuilController controller, + uint32_t port_index, + uint32_t buffer_size, + uint32_t protocol, + void const* buffer); + +/// Function to return the index for a port by symbol +typedef uint32_t (*SuilPortIndexFunc)( // + SuilController controller, + const char* port_symbol); + +/// Function to subscribe to notifications for a port +typedef uint32_t (*SuilPortSubscribeFunc)( // + SuilController controller, + uint32_t port_index, + uint32_t protocol, + const LV2_Feature* const* features); + +/// Function to unsubscribe from notifications for a port +typedef uint32_t (*SuilPortUnsubscribeFunc)( // + SuilController controller, + uint32_t port_index, + uint32_t protocol, + const LV2_Feature* const* features); + +/// Function called when a control is grabbed or released +typedef void (*SuilTouchFunc)( // + SuilController controller, + uint32_t port_index, + bool grabbed); + +/** + @} + @defgroup suil_library Library + @{ +*/ + +/// Initialization argument +typedef enum { SUIL_ARG_NONE } SuilArg; + +/** + Initialize suil. + + This function should be called as early as possible, before any other GUI + toolkit functions. The variable argument list is a sequence of SuilArg keys + and corresponding value pairs for passing any necessary platform-specific + information. It must be terminated with SUIL_ARG_NONE. +*/ +SUIL_API +void +suil_init(int* argc, char*** argv, SuilArg key, ...); + +/** + Check if suil can wrap a UI type. + + @param host_type_uri The URI of the desired widget type of the host, + corresponding to the `type_uri` parameter of suil_instance_new(). + + @param ui_type_uri The URI of the UI widget type. + + @return 0 if wrapping is unsupported, otherwise the quality of the wrapping + where 1 is the highest quality (direct native embedding with no wrapping) + and increasing values are of a progressively lower quality and/or stability. +*/ +SUIL_API +unsigned +suil_ui_supported(const char* host_type_uri, const char* ui_type_uri); + +/** + @} + @defgroup suil_host Host + @{ +*/ + +/** + UI host descriptor. + + This contains the various functions that a plugin UI may use to communicate + with the plugin. It is passed to suil_instance_new() to provide these + functions to the UI. +*/ +typedef struct SuilHostImpl SuilHost; + +/** + Create a new UI host descriptor. + + @param write_func Function to send a value to a plugin port. + @param index_func Function to get the index for a port by symbol. + @param subscribe_func Function to subscribe to port updates. + @param unsubscribe_func Function to unsubscribe from port updates. +*/ +SUIL_API +SuilHost* +suil_host_new(SuilPortWriteFunc write_func, + SuilPortIndexFunc index_func, + SuilPortSubscribeFunc subscribe_func, + SuilPortUnsubscribeFunc unsubscribe_func); + +/** + Set a touch function for a host descriptor. + + Note this function will only be called if the UI supports it. +*/ +SUIL_API +void +suil_host_set_touch_func(SuilHost* host, SuilTouchFunc touch_func); + +/** + Free `host`. +*/ +SUIL_API +void +suil_host_free(SuilHost* host); + +/** + @} +*/ + +/** + @defgroup suil_instance Instance + @{ +*/ + +/// An instance of an LV2 plugin UI +typedef struct SuilInstanceImpl SuilInstance; + +/// Opaque pointer to a UI handle +typedef void* SuilHandle; + +/// Opaque pointer to a UI widget +typedef void* SuilWidget; + +/** + Instantiate a UI for an LV2 plugin. + + This funcion may load a suil module to adapt the UI to the desired toolkit. + Suil is configured at compile time to load modules from the appropriate + place, but this can be changed at run-time via the environment variable + SUIL_MODULE_DIR. This makes it possible to bundle suil with an application. + + Note that some situations (Gtk in Qt, Windows in Gtk) require a parent + container to be passed as a feature with URI LV2_UI__parent + (http://lv2plug.in/ns/extensions/ui#ui) in order to work correctly. The + data must point to a single child container of the host widget set. + + @param host Host descriptor. + @param controller Opaque host controller pointer. + @param container_type_uri URI of the desired host container widget type. + @param plugin_uri URI of the plugin to instantiate this UI for. + @param ui_uri URI of the specifically desired UI. + @param ui_type_uri URI of the actual UI widget type. + @param ui_bundle_path Path of the UI bundle. + @param ui_binary_path Path of the UI binary. + @param features NULL-terminated array of supported features, or NULL. + @return A new UI instance, or NULL if instantiation failed. +*/ +SUIL_API +SuilInstance* +suil_instance_new(SuilHost* host, + SuilController controller, + const char* container_type_uri, + const char* plugin_uri, + const char* ui_uri, + const char* ui_type_uri, + const char* ui_bundle_path, + const char* ui_binary_path, + const LV2_Feature* const* features); + +/** + Free a plugin UI instance. + + The caller must ensure all references to the UI have been dropped before + calling this function (e.g. it has been removed from its parent). +*/ +SUIL_API +void +suil_instance_free(SuilInstance* instance); + +/** + Get the handle for a UI instance. + + Returns the handle to the UI instance. The returned handle has opaque type + to insulate the Suil API from LV2 extensions, but in pactice it is currently + of type `LV2UI_Handle`. This should not normally be needed. + + The returned handle is shared and must not be deleted. +*/ +SUIL_API +SuilHandle +suil_instance_get_handle(SuilInstance* instance); + +/** + Get the widget for a UI instance. + + Returns an opaque pointer to a widget, the type of which matches the + `container_type_uri` parameter of suil_instance_new(). Note this may be a + wrapper widget created by Suil, and not necessarily the widget directly + implemented by the UI. +*/ +SUIL_API +SuilWidget +suil_instance_get_widget(SuilInstance* instance); + +/** + Notify the UI about a change in a plugin port. + + This function can be used to notify the UI about any port change, but in the + simplest case is used to set the value of lv2:ControlPort ports. For + simplicity, this is a special case where `format` is 0, `buffer_size` is 4, + and `buffer` should point to a single float. + + The `buffer` must be valid only for the duration of this call, the UI must + not keep a reference to it. + + @param instance UI instance. + @param port_index Index of the port which has changed. + @param buffer_size Size of `buffer` in bytes. + @param format Format of `buffer` (mapped URI, or 0 for float). + @param buffer Change data, e.g. the new port value. +*/ +SUIL_API +void +suil_instance_port_event(SuilInstance* instance, + uint32_t port_index, + uint32_t buffer_size, + uint32_t format, + const void* buffer); + +/// Return a data structure defined by some LV2 extension URI +SUIL_API +const void* +suil_instance_extension_data(SuilInstance* instance, const char* uri); + +/** + @} + @} +*/ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* SUIL_SUIL_H */ diff --git a/crates/tek/Cargo.toml b/crates/tek/Cargo.toml new file mode 100644 index 00000000..b91c6792 --- /dev/null +++ b/crates/tek/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "tek" +edition = "2021" +version = "0.1.0" + +[dependencies] +jack = "0.10" +clap = { version = "4.5.4", features = [ "derive" ] } +crossterm = "0.27" +ratatui = { version = "0.26.3", features = [ "unstable-widget-ref", "underline-color" ] } +backtrace = "0.3.72" +microxdg = "0.1.2" +toml = "0.8.12" +better-panic = "0.3.0" +midly = "0.5" + +vst = "0.4.0" +#vst3 = "0.1.0" +livi = "0.7.4" +#atomic_enum = "0.3.0" +wavers = "1.4.3" +music-math = "0.1.1" +atomic_float = "1.0.0" +fraction = "0.15.3" +rlsf = "0.2.1" +r8brain-rs = "0.3.5" +clojure-reader = "0.1.0" +once_cell = "1.19.0" + +symphonia = { version = "0.5.4", features = [ "all" ] } + +dasp = { version = "0.11.0", features = [ "all" ] } + +rubato = "0.15.0" + +winit = { version = "0.30.4", features = [ "x11" ] } +#winit = { path = "../winit" } + +suil = { path = "../suil" } diff --git a/src/cli.rs b/crates/tek/src/cli.rs similarity index 100% rename from src/cli.rs rename to crates/tek/src/cli.rs diff --git a/src/config.rs b/crates/tek/src/config.rs similarity index 100% rename from src/config.rs rename to crates/tek/src/config.rs diff --git a/src/control.rs b/crates/tek/src/control.rs similarity index 100% rename from src/control.rs rename to crates/tek/src/control.rs diff --git a/src/core.rs b/crates/tek/src/core.rs similarity index 100% rename from src/core.rs rename to crates/tek/src/core.rs diff --git a/src/core/handle.rs b/crates/tek/src/core/handle.rs similarity index 100% rename from src/core/handle.rs rename to crates/tek/src/core/handle.rs diff --git a/src/core/midi.rs b/crates/tek/src/core/midi.rs similarity index 100% rename from src/core/midi.rs rename to crates/tek/src/core/midi.rs diff --git a/src/core/render.rs b/crates/tek/src/core/render.rs similarity index 100% rename from src/core/render.rs rename to crates/tek/src/core/render.rs diff --git a/src/core/time.rs b/crates/tek/src/core/time.rs similarity index 100% rename from src/core/time.rs rename to crates/tek/src/core/time.rs diff --git a/src/devices.rs b/crates/tek/src/devices.rs similarity index 100% rename from src/devices.rs rename to crates/tek/src/devices.rs diff --git a/src/devices/arranger.rs b/crates/tek/src/devices/arranger.rs similarity index 100% rename from src/devices/arranger.rs rename to crates/tek/src/devices/arranger.rs diff --git a/src/devices/arranger/arr_draw_h.rs b/crates/tek/src/devices/arranger/arr_draw_h.rs similarity index 100% rename from src/devices/arranger/arr_draw_h.rs rename to crates/tek/src/devices/arranger/arr_draw_h.rs diff --git a/src/devices/arranger/arr_draw_v.rs b/crates/tek/src/devices/arranger/arr_draw_v.rs similarity index 100% rename from src/devices/arranger/arr_draw_v.rs rename to crates/tek/src/devices/arranger/arr_draw_v.rs diff --git a/src/devices/arranger/arr_focus.rs b/crates/tek/src/devices/arranger/arr_focus.rs similarity index 100% rename from src/devices/arranger/arr_focus.rs rename to crates/tek/src/devices/arranger/arr_focus.rs diff --git a/src/devices/arranger/arr_phrase.rs b/crates/tek/src/devices/arranger/arr_phrase.rs similarity index 100% rename from src/devices/arranger/arr_phrase.rs rename to crates/tek/src/devices/arranger/arr_phrase.rs diff --git a/src/devices/arranger/arr_scene.rs b/crates/tek/src/devices/arranger/arr_scene.rs similarity index 100% rename from src/devices/arranger/arr_scene.rs rename to crates/tek/src/devices/arranger/arr_scene.rs diff --git a/src/devices/arranger/arr_track.rs b/crates/tek/src/devices/arranger/arr_track.rs similarity index 100% rename from src/devices/arranger/arr_track.rs rename to crates/tek/src/devices/arranger/arr_track.rs diff --git a/src/devices/chain.rs b/crates/tek/src/devices/chain.rs similarity index 100% rename from src/devices/chain.rs rename to crates/tek/src/devices/chain.rs diff --git a/src/devices/help.rs b/crates/tek/src/devices/help.rs similarity index 100% rename from src/devices/help.rs rename to crates/tek/src/devices/help.rs diff --git a/src/devices/looper.rs b/crates/tek/src/devices/looper.rs similarity index 100% rename from src/devices/looper.rs rename to crates/tek/src/devices/looper.rs diff --git a/src/devices/mixer.rs b/crates/tek/src/devices/mixer.rs similarity index 100% rename from src/devices/mixer.rs rename to crates/tek/src/devices/mixer.rs diff --git a/src/devices/plugin.rs b/crates/tek/src/devices/plugin.rs similarity index 74% rename from src/devices/plugin.rs rename to crates/tek/src/devices/plugin.rs index b2d7dacd..01c6807d 100644 --- a/src/devices/plugin.rs +++ b/crates/tek/src/devices/plugin.rs @@ -1,15 +1,8 @@ //! Plugin (currently LV2 only; TODO other formats) use crate::core::*; -use ::livi::{ - World, - Instance, - Plugin as LiviPlugin, - Features, - FeaturesBuilder, - Port, - event::LV2AtomSequence, -}; + +submod! { lv2 } pub fn handle_plugin (state: &mut Plugin, event: &AppEvent) -> Usually { handle_keymap(state, event, KEYMAP_PLUGIN) @@ -17,29 +10,29 @@ pub fn handle_plugin (state: &mut Plugin, event: &AppEvent) -> Usually { /// Key bindings for plugin device. pub const KEYMAP_PLUGIN: &'static [KeyBinding] = keymap!(Plugin { - [Up, NONE, "cursor_up", "move cursor up", |s: &mut Plugin|{ + [Up, NONE, "/plugin/cursor_up", "move cursor up", |s: &mut Plugin|{ s.selected = s.selected.saturating_sub(1); Ok(true) }], - [Down, NONE, "cursor_down", "move cursor down", |s: &mut Plugin|{ + [Down, NONE, "/plugin/cursor_down", "move cursor down", |s: &mut Plugin|{ s.selected = (s.selected + 1).min(match &s.plugin { Some(PluginKind::LV2(LV2Plugin { port_list, .. })) => port_list.len() - 1, _ => unimplemented!() }); Ok(true) }], - [PageUp, NONE, "cursor_up", "move cursor up", |s: &mut Plugin|{ + [PageUp, NONE, "/plugin/cursor_page_up", "move cursor up", |s: &mut Plugin|{ s.selected = s.selected.saturating_sub(8); Ok(true) }], - [PageDown, NONE, "cursor_down", "move cursor down", |s: &mut Plugin|{ + [PageDown, NONE, "/plugin/cursor_page_down", "move cursor down", |s: &mut Plugin|{ s.selected = (s.selected + 10).min(match &s.plugin { Some(PluginKind::LV2(LV2Plugin { port_list, .. })) => port_list.len() - 1, _ => unimplemented!() }); Ok(true) }], - [Char(','), NONE, "decrement", "decrement value", |s: &mut Plugin|{ + [Char(','), NONE, "/plugin/decrement", "decrement value", |s: &mut Plugin|{ match s.plugin.as_mut() { Some(PluginKind::LV2(LV2Plugin { port_list, ref mut instance, .. })) => { let index = port_list[s.selected].index; @@ -51,7 +44,7 @@ pub const KEYMAP_PLUGIN: &'static [KeyBinding] = keymap!(Plugin { } Ok(true) }], - [Char('.'), NONE, "increment", "increment value", |s: &mut Plugin|{ + [Char('.'), NONE, "/plugin/decrement", "increment value", |s: &mut Plugin|{ match s.plugin.as_mut() { Some(PluginKind::LV2(LV2Plugin { port_list, ref mut instance, .. })) => { let index = port_list[s.selected].index; @@ -63,6 +56,16 @@ pub const KEYMAP_PLUGIN: &'static [KeyBinding] = keymap!(Plugin { } Ok(true) }], + [Char('g'), NONE, "/plugin/gui_toggle", "toggle plugin UI", |s: &mut Plugin|{ + match s.plugin { + Some(PluginKind::LV2(ref mut plugin)) => { + plugin.ui_thread = Some(run_lv2_ui(LV2PluginUI::new()?)?); + }, + Some(_) => unreachable!(), + None => {} + } + Ok(true) + }], }); /// A plugin device. @@ -203,68 +206,6 @@ fn draw_header (state: &Plugin, buf: &mut Buffer, x: u16, y: u16, w: u16) -> Usu Ok(Rect { x, y, width: w, height: 1 }) } -/// A LV2 plugin. -pub struct LV2Plugin { - pub world: World, - pub instance: Instance, - pub plugin: LiviPlugin, - pub features: Arc, - pub port_list: Vec, - pub input_buffer: Vec -} - -impl LV2Plugin { - pub fn new (uri: &str) -> Usually { - // Get 1st plugin at URI - let world = World::with_load_bundle(&uri); - let features = FeaturesBuilder { min_block_length: 1, max_block_length: 65536 }; - let features = world.build_features(features); - let mut plugin = None; - for p in world.iter_plugins() { - plugin = Some(p); - break - } - let plugin = plugin.unwrap(); - let err = &format!("init {uri}"); - - // Instantiate - Ok(Self { - world, - instance: unsafe { - plugin - .instantiate(features.clone(), 48000.0) - .expect(&err) - }, - port_list: { - let mut port_list = vec![]; - for port in plugin.ports() { - port_list.push(port); - } - port_list - }, - plugin, - features, - input_buffer: Vec::with_capacity(1024) - }) - } -} - -impl Plugin { - pub fn lv2 (name: &str, path: &str) -> Usually { - let plugin = LV2Plugin::new(path)?; - Jack::new(name)? - .ports_from_lv2(&plugin.plugin) - .run(|ports|Box::new(Self { - name: name.into(), - path: Some(String::from(path)), - plugin: Some(PluginKind::LV2(plugin)), - selected: 0, - mapping: false, - ports - })) - } -} - impl ::vst::host::Host for Plugin {} fn set_vst_plugin (host: &Arc>, _path: &str) -> Usually { @@ -277,3 +218,10 @@ fn set_vst_plugin (host: &Arc>, _path: &str) -> Usually Usually { + let plugin = LV2Plugin::new(path)?; + Jack::new(name)? + .ports_from_lv2(&plugin.plugin) + .run(|ports|Box::new(Self { + name: name.into(), + path: Some(String::from(path)), + plugin: Some(PluginKind::LV2(plugin)), + selected: 0, + mapping: false, + ports + })) + } +} + +/// A LV2 plugin. +pub struct LV2Plugin { + pub world: World, + pub instance: Instance, + pub plugin: LiviPlugin, + pub features: Arc, + pub port_list: Vec, + pub input_buffer: Vec, + pub ui_thread: Option>, +} + +impl LV2Plugin { + pub fn new (uri: &str) -> Usually { + // Get 1st plugin at URI + let world = World::with_load_bundle(&uri); + let features = FeaturesBuilder { min_block_length: 1, max_block_length: 65536 }; + let features = world.build_features(features); + let mut plugin = None; + for p in world.iter_plugins() { + plugin = Some(p); + break + } + let plugin = plugin.unwrap(); + let err = &format!("init {uri}"); + + // Instantiate + Ok(Self { + world, + instance: unsafe { + plugin + .instantiate(features.clone(), 48000.0) + .expect(&err) + }, + port_list: { + let mut port_list = vec![]; + for port in plugin.ports() { + port_list.push(port); + } + port_list + }, + plugin, + features, + input_buffer: Vec::with_capacity(1024), + ui_thread: None + }) + } +} + +pub fn run_lv2_ui (mut ui: LV2PluginUI) -> Usually> { + Ok(spawn(move||{ + let event_loop = EventLoop::builder().with_x11().with_any_thread(true).build().unwrap(); + event_loop.set_control_flow(ControlFlow::Wait); + event_loop.run_app(&mut ui).unwrap() + })) +} + +/// A LV2 plugin's X11 UI. +pub struct LV2PluginUI { + pub window: Option +} + +impl LV2PluginUI { + pub fn new () -> Usually { + Ok(Self { window: None }) + } +} + +impl ApplicationHandler for LV2PluginUI { + fn resumed (&mut self, event_loop: &ActiveEventLoop) { + self.window = Some(event_loop.create_window(Window::default_attributes()).unwrap()); + } + fn window_event (&mut self, event_loop: &ActiveEventLoop, id: WindowId, event: WindowEvent) { + match event { + WindowEvent::CloseRequested => { + self.window.as_ref().unwrap().set_visible(false); + event_loop.exit(); + }, + WindowEvent::RedrawRequested => { + self.window.as_ref().unwrap().request_redraw(); + } + _ => (), + } + } +} + +fn lv2_ui_instantiate (kind: &str) { + //let host = Suil +} diff --git a/src/devices/sampler.rs b/crates/tek/src/devices/sampler.rs similarity index 100% rename from src/devices/sampler.rs rename to crates/tek/src/devices/sampler.rs diff --git a/src/devices/sampler/add_sample.rs b/crates/tek/src/devices/sampler/add_sample.rs similarity index 100% rename from src/devices/sampler/add_sample.rs rename to crates/tek/src/devices/sampler/add_sample.rs diff --git a/src/devices/sampler/sample.rs b/crates/tek/src/devices/sampler/sample.rs similarity index 100% rename from src/devices/sampler/sample.rs rename to crates/tek/src/devices/sampler/sample.rs diff --git a/src/devices/sampler/voice.rs b/crates/tek/src/devices/sampler/voice.rs similarity index 100% rename from src/devices/sampler/voice.rs rename to crates/tek/src/devices/sampler/voice.rs diff --git a/src/devices/sequencer.rs b/crates/tek/src/devices/sequencer.rs similarity index 100% rename from src/devices/sequencer.rs rename to crates/tek/src/devices/sequencer.rs diff --git a/src/devices/setup.rs b/crates/tek/src/devices/setup.rs similarity index 100% rename from src/devices/setup.rs rename to crates/tek/src/devices/setup.rs diff --git a/src/devices/transport.rs b/crates/tek/src/devices/transport.rs similarity index 100% rename from src/devices/transport.rs rename to crates/tek/src/devices/transport.rs diff --git a/src/edn.rs b/crates/tek/src/edn.rs similarity index 100% rename from src/edn.rs rename to crates/tek/src/edn.rs diff --git a/src/jack.rs b/crates/tek/src/jack.rs similarity index 100% rename from src/jack.rs rename to crates/tek/src/jack.rs diff --git a/src/jack/device.rs b/crates/tek/src/jack/device.rs similarity index 100% rename from src/jack/device.rs rename to crates/tek/src/jack/device.rs diff --git a/src/jack/event.rs b/crates/tek/src/jack/event.rs similarity index 100% rename from src/jack/event.rs rename to crates/tek/src/jack/event.rs diff --git a/src/jack/factory.rs b/crates/tek/src/jack/factory.rs similarity index 100% rename from src/jack/factory.rs rename to crates/tek/src/jack/factory.rs diff --git a/src/jack/ports.rs b/crates/tek/src/jack/ports.rs similarity index 100% rename from src/jack/ports.rs rename to crates/tek/src/jack/ports.rs diff --git a/src/main.rs b/crates/tek/src/main.rs similarity index 96% rename from src/main.rs rename to crates/tek/src/main.rs index 44722ba5..4cb634f1 100644 --- a/src/main.rs +++ b/crates/tek/src/main.rs @@ -17,7 +17,7 @@ use crate::{core::*, model::*}; /// Application entrypoint. pub fn main () -> Usually<()> { - run(App::from_edn(include_str!("../demos/project.edn"))? + run(App::from_edn(include_str!("../../../demos/project.edn"))? .activate(Some(|app: &Arc>|Ok({ let (midi_in, mut midi_outs) = { let app = app.read().unwrap(); diff --git a/src/model.rs b/crates/tek/src/model.rs similarity index 100% rename from src/model.rs rename to crates/tek/src/model.rs diff --git a/src/view.rs b/crates/tek/src/view.rs similarity index 100% rename from src/view.rs rename to crates/tek/src/view.rs diff --git a/src/view/border.rs b/crates/tek/src/view/border.rs similarity index 100% rename from src/view/border.rs rename to crates/tek/src/view/border.rs diff --git a/src/view/split.rs b/crates/tek/src/view/split.rs similarity index 100% rename from src/view/split.rs rename to crates/tek/src/view/split.rs diff --git a/src/view/theme.rs b/crates/tek/src/view/theme.rs similarity index 100% rename from src/view/theme.rs rename to crates/tek/src/view/theme.rs diff --git a/demos/project.edn b/demos/project.edn index 863978b3..867b0e70 100644 --- a/demos/project.edn +++ b/demos/project.edn @@ -1,5 +1,6 @@ (bpm 150) +(midi-in "nanoKEY Studio.*capture.*") (midi-in "nanoKEY Studio.*capture.*") (audio-out "Built-.+:playback_FL", "Built-.+:playback_FR") diff --git a/shell.nix b/shell.nix index bef81b01..6d81610f 100755 --- a/shell.nix +++ b/shell.nix @@ -19,5 +19,8 @@ libgcc.lib # for Panagement xorg.libX11 + xorg.libXcursor + xorg.libXi + libxkbcommon ]); }