From 10c922e0c53ab89d472e59fc4b7b96e35796bf18 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Wed, 19 Feb 2025 22:55:09 +0200 Subject: [PATCH] use object to parse and add jack stub --- Cargo.lock | 1315 ++----------------------------------- crates/vestal/Cargo.toml | 10 +- crates/vestal/src/dll.rs | 13 - crates/vestal/src/main.rs | 131 +++- crates/vestal/src/util.rs | 13 + crates/wrapper/Cargo.toml | 3 +- crates/wrapper/src/lib.rs | 55 +- crates/wrapper/src/nih.rs | 96 +++ 8 files changed, 281 insertions(+), 1355 deletions(-) create mode 100644 crates/vestal/src/util.rs create mode 100644 crates/wrapper/src/nih.rs diff --git a/Cargo.lock b/Cargo.lock index 4858124..5479dd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,60 +2,12 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" version = "0.6.18" @@ -106,182 +58,18 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "anyhow" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" - -[[package]] -name = "anymap3" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170433209e817da6aae2c51aa0dd443009a613425dd041ebfb2492d1c4c11a25" - -[[package]] -name = "atomic_float" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62af46d040ba9df09edc6528dae9d8e49f5f3e82f55b7d2ec31a733c38dbc49d" - -[[package]] -name = "atomic_refcell" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "better-panic" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa9e1d11a268684cbd90ed36370d7577afb6c62d912ddff5c15fc34343e5036" -dependencies = [ - "backtrace", - "console", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "borsh" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5430e3be710b68d984d1391c854eb431a9d548640711faa54eecb1df93db91cc" -dependencies = [ - "cfg_aliases", -] - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" - -[[package]] -name = "cc" -version = "1.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9" -dependencies = [ - "shlex", -] - [[package]] name = "cfg-if" 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 = "chrono" -version = "0.4.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "strsim 0.10.0", - "termcolor", - "textwrap", -] - [[package]] name = "clap" version = "4.5.30" @@ -291,11 +79,6 @@ dependencies = [ "clap_builder", ] -[[package]] -name = "clap-sys" -version = "0.3.0" -source = "git+https://github.com/robbert-vdh/clap-sys.git?branch=feature%2Fcstr-macro#523a5f8a8dd021ec99e7d6e0c0ebe7741a3da9d4" - [[package]] name = "clap_builder" version = "4.5.30" @@ -304,17 +87,8 @@ checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.4", - "strsim 0.11.1", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", + "clap_lex", + "strsim", ] [[package]] @@ -323,58 +97,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" -[[package]] -name = "cmake" -version = "0.1.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" -[[package]] -name = "console" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "windows-sys", -] - -[[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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.4.2" @@ -384,131 +112,12 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elf" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" - -[[package]] -name = "encode_unicode" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" -[[package]] -name = "exe" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f6e4213f515539932c53cd36a87ad8296bb8b2bea7f71b27438b811ad64392" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "chrono", - "hex", - "md-5", - "num-traits", - "pkbuffer", - "sha-1", - "sha2", - "widestring", -] - -[[package]] -name = "fern" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29" -dependencies = [ - "log", -] - [[package]] name = "flate2" version = "1.0.35" @@ -525,45 +134,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "goblin" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa0a64d21a7eb230583b4c5f4e23b7e4e57974f96620f42a7e75e08ae66d745" -dependencies = [ - "log", - "plain", - "scroll", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.15.2" @@ -573,54 +143,6 @@ dependencies = [ "foldhash", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.7.1" @@ -628,16 +150,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.15.2", -] - -[[package]] -name = "inflate" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" -dependencies = [ - "adler32", + "hashbrown", ] [[package]] @@ -647,75 +160,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +name = "jack" +version = "0.13.0" +source = "git+https://codeberg.org/unspeaker/rust-jack#a13c1c4d20343e574787a703eaeea7aeda63b084" dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lancelot" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f6aefdab78ed7ff3bf239487d76a63483a2ac01ca99a8c7cf5b091351e656e7" -dependencies = [ - "ansi_term", - "anyhow", - "bitflags 1.3.2", - "bitvec", - "byteorder", - "chrono", - "goblin", - "lancelot-flirt", + "bitflags", + "jack-sys", "lazy_static", + "libc", "log", - "object", - "prost", - "regex", - "smallvec", - "smol_str", - "thiserror", - "widestring", - "zydis", ] [[package]] -name = "lancelot-flirt" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a10286b78d281dba7c2534da6c5ef13668e594c62e83495233c858f1877b912a" +name = "jack-sys" +version = "0.5.1" +source = "git+https://codeberg.org/unspeaker/rust-jack#a13c1c4d20343e574787a703eaeea7aeda63b084" dependencies = [ - "anyhow", - "better-panic", - "bitflags 1.3.2", - "bitvec", - "chrono", - "clap 3.2.25", - "fern", - "inflate", + "bitflags", + "lazy_static", + "libc", + "libloading", "log", - "nom", - "regex", - "smallvec", - "thiserror", + "pkg-config", ] [[package]] @@ -731,13 +197,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] -name = "lock_api" -version = "0.4.12" +name = "libloading" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ - "autocfg", - "scopeguard", + "cfg-if", + "windows-targets", ] [[package]] @@ -746,44 +212,12 @@ version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "md-5" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" -dependencies = [ - "block-buffer", - "digest", - "opaque-debug", -] - [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "midi-consts" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2dd5c7f8aaf48a76e389068ab25ed80bdbc226b887f9013844c415698c9952" - -[[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.8.4" @@ -793,103 +227,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "nih_log" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0cdb52ef79af48ae110401c883bdb9c15e0306a99ab6ecf18bc52068b668e54" -dependencies = [ - "atty", - "log", - "once_cell", - "termcolor", - "time", - "windows", -] - -[[package]] -name = "nih_plug" -version = "0.0.0" -source = "git+https://github.com/robbert-vdh/nih-plug#d4be40eb5bf60579a5f9dec1d8e558a2807a3eb8" -dependencies = [ - "anyhow", - "anymap3", - "atomic_float", - "atomic_refcell", - "backtrace", - "bitflags 1.3.2", - "cfg-if", - "clap-sys", - "core-foundation", - "crossbeam", - "libc", - "log", - "midi-consts", - "nih_log", - "nih_plug_derive", - "objc", - "parking_lot", - "raw-window-handle", - "serde", - "serde_json", - "vst3-sys", - "widestring", - "windows", -] - -[[package]] -name = "nih_plug_derive" -version = "0.1.0" -source = "git+https://github.com/robbert-vdh/nih-plug#d4be40eb5bf60579a5f9dec1d8e558a2807a3eb8" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_threads" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" -dependencies = [ - "libc", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - [[package]] name = "object" version = "0.36.7" @@ -898,8 +235,8 @@ checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "crc32fast", "flate2", - "hashbrown 0.15.2", - "indexmap 2.7.1", + "hashbrown", + "indexmap", "memchr", "ruzstd", ] @@ -911,72 +248,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] -name = "opaque-debug" -version = "0.3.1" +name = "pkg-config" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "pkbuffer" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc2d171e6bab0498ea5f696960ea3647194a0549b12af99070f1e4cf6d62d94" -dependencies = [ - "memchr", - "pkbuffer_derive", -] - -[[package]] -name = "pkbuffer_derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c86ad26b9715c9c1664b79f6e5c44baf38fb87a5133bdd7ec90baff7b71d155" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "proc-macro2" @@ -987,29 +262,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 2.0.98", -] - [[package]] name = "quote" version = "1.0.38" @@ -1019,68 +271,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - -[[package]] -name = "redox_syscall" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" -dependencies = [ - "bitflags 2.8.0", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustversion" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" - [[package]] name = "ruzstd" version = "0.7.3" @@ -1090,38 +280,6 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "ryu" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scroll" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", -] - [[package]] name = "serde" version = "1.0.217" @@ -1139,19 +297,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", -] - -[[package]] -name = "serde_json" -version = "1.0.138" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", + "syn", ] [[package]] @@ -1162,55 +308,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer", - "cfg-if", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer", - "cfg-if", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" - -[[package]] -name = "smol_str" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d" -dependencies = [ - "borsh", - "serde", + "syn", ] [[package]] @@ -1219,29 +317,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.98" @@ -1264,77 +345,11 @@ dependencies = [ ] [[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +name = "tek_jack" +version = "0.2.0" +source = "git+https://codeberg.org/unspeaker/tek#77d617f9a0393b9d9327dd66f6d256d2fec14866" dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" - -[[package]] -name = "thiserror" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", -] - -[[package]] -name = "time" -version = "0.3.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" -dependencies = [ - "deranged", - "itoa", - "libc", - "num-conv", - "num_threads", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" -dependencies = [ - "num-conv", - "time-core", + "jack", ] [[package]] @@ -1347,12 +362,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "typenum" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" - [[package]] name = "unicode-ident" version = "1.0.17" @@ -1365,21 +374,11 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - [[package]] name = "vestal" version = "0.1.0" dependencies = [ - "clap 4.5.30", - "elf", - "exe", - "goblin", - "lancelot", + "clap", "object", "syscalls", ] @@ -1388,157 +387,7 @@ dependencies = [ name = "vestal_wrapper" version = "0.1.0" dependencies = [ - "nih_plug", -] - -[[package]] -name = "vst3-com" -version = "0.1.0" -source = "git+https://github.com/robbert-vdh/vst3-sys.git?branch=fix%2Fdrop-box-from-raw#b3ff4d775940f5b476b9d1cca02a90e07e1922a2" -dependencies = [ - "vst3-com-macros", -] - -[[package]] -name = "vst3-com-macros" -version = "0.2.0" -source = "git+https://github.com/robbert-vdh/vst3-sys.git?branch=fix%2Fdrop-box-from-raw#b3ff4d775940f5b476b9d1cca02a90e07e1922a2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "vst3-com-macros-support", -] - -[[package]] -name = "vst3-com-macros-support" -version = "0.2.0" -source = "git+https://github.com/robbert-vdh/vst3-sys.git?branch=fix%2Fdrop-box-from-raw#b3ff4d775940f5b476b9d1cca02a90e07e1922a2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "vst3-sys" -version = "0.1.0" -source = "git+https://github.com/robbert-vdh/vst3-sys.git?branch=fix%2Fdrop-box-from-raw#b3ff4d775940f5b476b9d1cca02a90e07e1922a2" -dependencies = [ - "vst3-com", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.98", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys", -] - -[[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" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", + "tek_jack", ] [[package]] @@ -1547,22 +396,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[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", + "windows-targets", ] [[package]] @@ -1571,46 +405,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[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.52.6" @@ -1623,71 +439,26 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zydis" -version = "3.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc13daee87922e0d6dc6137327be10327ad1cee0515ec775f898206193aaeb8" -dependencies = [ - "bitflags 1.3.2", - "cmake", - "serde", - "serde_derive", -] diff --git a/crates/vestal/Cargo.toml b/crates/vestal/Cargo.toml index 2af20fc..0dd85a5 100644 --- a/crates/vestal/Cargo.toml +++ b/crates/vestal/Cargo.toml @@ -4,11 +4,11 @@ version = "0.1.0" edition = "2021" [dependencies] -object = { version = "0.36.7", features = [ "read_core", "write_core", "elf", "pe" ] } -exe = "0.5.6" -elf = "0.7.4" -goblin = "0.9.3" clap = { version = "4.5.4", features = [ "cargo" ] } -lancelot = "0.9.7" syscalls = "0.6.18" +object = { version = "0.36.7", features = [ "read_core", "write_core", "elf", "pe" ] } +#exe = "0.5.6" +#elf = "0.7.4" +#goblin = "0.9.3" +#lancelot = "0.9.7" #falcon = "0.5.5" diff --git a/crates/vestal/src/dll.rs b/crates/vestal/src/dll.rs index 3d87f21..2b18b3a 100644 --- a/crates/vestal/src/dll.rs +++ b/crates/vestal/src/dll.rs @@ -136,16 +136,3 @@ impl Default for AEffect { } } } -/// You can manually patch DLLs by prepending -/// a `#!/usr/bin/env vestal` line to them. -pub fn slice_shebang (buffer: &[u8]) -> (Vec, Vec) { - if buffer.get(0) == Some(&b'#') && buffer.get(1) == Some(&b'!') { - if let Some((bang, data)) = buffer.split_once(|x|*x==0x0a) { - (bang.to_vec(), data.to_vec()) - } else { - (buffer.to_vec(), vec![]) - } - } else { - (vec![], buffer.to_vec()) - } -} diff --git a/crates/vestal/src/main.rs b/crates/vestal/src/main.rs index 1d793d9..8e53d48 100644 --- a/crates/vestal/src/main.rs +++ b/crates/vestal/src/main.rs @@ -1,14 +1,20 @@ #![feature(slice_split_once)] -mod dll; -mod exec; +mod util; +pub(crate) use self::util::*; +//mod dll; +//mod exec; +pub(crate) use std::pin::Pin; +pub(crate) use std::sync::Arc; pub(crate) use std::error::Error; pub(crate) use std::path::{Path, PathBuf}; -pub(crate) use std::collections::HashMap; +pub(crate) use std::collections::{HashMap, HashSet}; pub(crate) use std::fs::{read, canonicalize}; -pub(crate) use lancelot::loader::pe::{PE, reloc::apply_relocations}; -pub(crate) use goblin::{error, Object, pe::{import::Import, export::Export}}; -pub(crate) use object::read::pe::PeFile; -pub(crate) use object::write::elf::Writer as ElfWriter; +//pub(crate) use ::lancelot::loader::pe::{PE, reloc::apply_relocations}; +//pub(crate) use ::goblin::{error, Object, pe::{import::Import, export::Export}}; +pub(crate) use ::object::endian::LittleEndian; +pub(crate) use ::object::pe::ImageNtHeaders64; +pub(crate) use ::object::read::pe::PeFile; +pub(crate) use ::object::write::elf::Writer as ElfWriter; use clap::{arg, command, value_parser, ArgAction, Command}; type Usually = Result>; fn main () -> Usually<()> { @@ -18,17 +24,110 @@ fn main () -> Usually<()> { //.arg(arg!(-s --stub "Provide stub import").required(false)) .get_matches(); if let Some(path) = matches.get_one::("path") { - relink(path) - //let mut context = crate::dll::PEContext::default(); - //context.load("main", &canonicalize(&path)?)?; - //crate::exec::relink(&context)?; + let mut vestal = Vestal::default(); + vestal.search_paths.push(std::env::current_dir()?); + vestal.search_paths.push("/home/user/Lab/Cosmo/wineprefix/drive_c/windows/system32".into()); + if let Some(path) = vestal.resolve(path.to_str().expect("path must be unicode"))? { + vestal.load(&path)?; + vestal.inspect(); + } else { + panic!("Could not find: {path:?}") + } } else { panic!("Pass a path to a VST DLL.") } -} - -fn relink (path: &PathBuf) -> Usually<()> { - let (bang, data) = crate::dll::slice_shebang(read(path)?.as_slice()); - let pe = PeFile::parse(data.as_slice())?; Ok(()) } +#[derive(Default, Debug)] +struct Vestal { + search_paths: Vec, + paths_visited: HashSet>, + path_to_bang: HashMap, Arc<[u8]>>, + path_to_data: HashMap, Arc<[u8]>>, + path_to_exports: HashMap, Vec>, + path_to_imports: HashMap, Vec>, +} +#[derive(Debug)] +struct Export {} +#[derive(Debug)] +struct Import {} +impl Vestal { + fn resolve (&self, name: &str) -> Usually> { + for base in self.search_paths.iter() { + let mut path = base.clone(); + path.push(name.to_lowercase()); + if std::fs::exists(&path)? { + return Ok(Some(canonicalize(&path)?)) + } + } + Ok(None) + } + fn load (&mut self, path: &PathBuf) -> Usually<()> { + if !self.paths_visited.contains(path) { + let path = Arc::new(path.clone()); + println!("(load {path:?})"); + self.paths_visited.insert(path.clone()); + let (bang, data) = slice_shebang(read(path.as_path())?.as_slice()); + self.path_to_bang.insert(path.clone(), bang.into()); + self.path_to_data.insert(path.clone(), data.clone().into()); + let dll: PeFile<'_, ImageNtHeaders64, &[u8]> = PeFile::parse(data.as_slice())?; + if let Some(exports) = dll.export_table()? { + let mut collected = vec![]; + for export in exports.exports()?.iter() { + collected.push(Export {}); + if let Some(name) = export.name { + let name = String::from_utf8(name.to_vec())?; + //println!(" (export {} {:?} {:?})", &export.ordinal, &name, &export.target); + } else { + //println!(" (export {} {:?})", &export.ordinal, &export.target) + } + } + self.path_to_exports.insert(path.clone(), collected); + } + if let Some(imports) = dll.import_table()? { + let mut collected = vec![]; + for import in imports.descriptors()? { + let name = imports.name(import?.name.get(LittleEndian))?.to_vec(); + let name = String::from_utf8(name.to_vec())?; + let name = name.to_lowercase(); + if let Some(path) = self.resolve(&name)? { + if !self.paths_visited.contains(&path) { + //println!("(import {name:?})"); + self.load(&path)?; + } + } else { + panic!("not found: {name:?}"); + } + } + self.path_to_imports.insert(path.clone(), collected); + } + } + Ok(()) + } + fn inspect (&self) { + for path in self.search_paths.iter() { + println!("(search {path:?})") + } + for path in self.paths_visited.iter() { + println!("(visited {path:?})") + } + for (path, bang) in self.path_to_bang.iter() { + if bang.len() > 0 { + println!("(bang {path:?} {:x})", bang.len()) + } + } + for (path, data) in self.path_to_data.iter() { + println!("(buffer {:p} 0x{:08x} {path:?})", data.as_ptr(), data.len()) + } + for (path, exports) in self.path_to_exports.iter() { + //println!("(exports {path:?}\n {exports:?})") + } + for (path, imports) in self.path_to_imports.iter() { + //print!("(imports {path:?}"); + //for import in imports.iter() { + //print!("\n {import:?}"); + //} + //println!(")"); + } + } +} diff --git a/crates/vestal/src/util.rs b/crates/vestal/src/util.rs new file mode 100644 index 0000000..71ae476 --- /dev/null +++ b/crates/vestal/src/util.rs @@ -0,0 +1,13 @@ +/// You can manually patch DLLs by prepending +/// a `#!/usr/bin/env vestal` line to them. +pub fn slice_shebang (buffer: &[u8]) -> (Vec, Vec) { + if buffer.get(0) == Some(&b'#') && buffer.get(1) == Some(&b'!') { + if let Some((bang, data)) = buffer.split_once(|x|*x==0x0a) { + (bang.to_vec(), data.to_vec()) + } else { + (buffer.to_vec(), vec![]) + } + } else { + (vec![], buffer.to_vec()) + } +} diff --git a/crates/wrapper/Cargo.toml b/crates/wrapper/Cargo.toml index e339759..3e39d4a 100644 --- a/crates/wrapper/Cargo.toml +++ b/crates/wrapper/Cargo.toml @@ -7,4 +7,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -nih_plug = { git = "https://github.com/robbert-vdh/nih-plug" } +#nih_plug = { git = "https://github.com/robbert-vdh/nih-plug" } +tek_jack = { git = "https://codeberg.org/unspeaker/tek", ref = "77d617f9" } diff --git a/crates/wrapper/src/lib.rs b/crates/wrapper/src/lib.rs index 42d1bbd..a7a27ac 100644 --- a/crates/wrapper/src/lib.rs +++ b/crates/wrapper/src/lib.rs @@ -1,49 +1,8 @@ -use std::sync::Arc; -use nih_plug::prelude::*; -#[derive(Default)] pub struct VestalWrapper { params: Arc } -#[derive(Default, Clone, Params)] struct VestalWrapperParams {} -impl Plugin for VestalWrapper { - const NAME: &'static str = "VESTAL"; - const VENDOR: &'static str = "AUTHOR"; - const URL: &'static str = env!("CARGO_PKG_HOMEPAGE"); - const EMAIL: &'static str = "EMAIL"; - const VERSION: &'static str = env!("CARGO_PKG_VERSION"); - const AUDIO_IO_LAYOUTS: &'static [AudioIOLayout] = &[]; - const SAMPLE_ACCURATE_AUTOMATION: bool = true; - type SysExMessage = (); - type BackgroundTask = (); - fn params (&self) -> Arc { - self.params.clone() - } - fn editor (&mut self, _async_executor: AsyncExecutor) -> Option> { - None - } - fn initialize ( - &mut self, _: &AudioIOLayout, _: &BufferConfig, _: &mut impl InitContext, - ) -> bool { - todo!("initialize"); - true - } - fn reset (&mut self) { - todo!("reset"); - } - fn process ( - &mut self, _: &mut Buffer, _: &mut AuxiliaryBuffers, _: &mut impl ProcessContext - ) -> ProcessStatus { - todo!("process"); - ProcessStatus::Normal - } +use tek_jack::{*, jack::*}; +use std::error::Error; +pub fn main () -> Result<(), Box> { + let jack = Jack::new("vestal")?.run(|jack|Ok(Host(jack.clone())))?; + Ok(()) } -impl ClapPlugin for VestalWrapper { - const CLAP_ID: &'static str = "ID"; - const CLAP_DESCRIPTION: Option<&'static str> = Some("DESC"); - const CLAP_MANUAL_URL: Option<&'static str> = Some(Self::URL); - const CLAP_SUPPORT_URL: Option<&'static str> = None; - const CLAP_FEATURES: &'static [ClapFeature] = &[]; -} -impl Vst3Plugin for VestalWrapper { - const VST3_CLASS_ID: [u8; 16] = *b"VESTAL_________."; - const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[]; -} -nih_export_clap!(VestalWrapper); -nih_export_vst3!(VestalWrapper); +struct Host(Jack); +audio!(|self: Host, _c, _s|Control::Continue); diff --git a/crates/wrapper/src/nih.rs b/crates/wrapper/src/nih.rs new file mode 100644 index 0000000..61ebb54 --- /dev/null +++ b/crates/wrapper/src/nih.rs @@ -0,0 +1,96 @@ +use std::sync::Arc; +use nih_plug::prelude::*; +#[derive(Default)] pub struct VestalWrapper { params: Arc } +#[derive(Default, Clone, Params)] struct VestalWrapperParams {} +impl Plugin for VestalWrapper { + const NAME: &'static str = "VESTAL"; + const VENDOR: &'static str = "AUTHOR"; + const URL: &'static str = env!("CARGO_PKG_HOMEPAGE"); + const EMAIL: &'static str = "EMAIL"; + const VERSION: &'static str = env!("CARGO_PKG_VERSION"); + const AUDIO_IO_LAYOUTS: &'static [AudioIOLayout] = &[]; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; + type SysExMessage = (); + type BackgroundTask = (); + fn params (&self) -> Arc { + self.params.clone() + } + fn editor (&mut self, _async_executor: AsyncExecutor) -> Option> { + None + } + fn initialize ( + &mut self, _: &AudioIOLayout, _: &BufferConfig, _: &mut impl InitContext, + ) -> bool { + todo!("initialize"); + true + } + fn reset (&mut self) { + todo!("reset"); + } + fn process ( + &mut self, _: &mut Buffer, _: &mut AuxiliaryBuffers, _: &mut impl ProcessContext + ) -> ProcessStatus { + todo!("process"); + ProcessStatus::Normal + } +} +impl ClapPlugin for VestalWrapper { + const CLAP_ID: &'static str = "ID"; + const CLAP_DESCRIPTION: Option<&'static str> = Some("DESC"); + const CLAP_MANUAL_URL: Option<&'static str> = Some(Self::URL); + const CLAP_SUPPORT_URL: Option<&'static str> = None; + const CLAP_FEATURES: &'static [ClapFeature] = &[]; +} +impl Vst3Plugin for VestalWrapper { + const VST3_CLASS_ID: [u8; 16] = *b"VESTAL_________."; + const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[]; +} +nih_export_clap!(VestalWrapper); +nih_export_vst3!(VestalWrapper); +#[derive(Default)] pub struct VestalWrapper { params: Arc } +#[derive(Default, Clone, Params)] struct VestalWrapperParams {} +impl Plugin for VestalWrapper { + const NAME: &'static str = "VESTAL"; + const VENDOR: &'static str = "AUTHOR"; + const URL: &'static str = env!("CARGO_PKG_HOMEPAGE"); + const EMAIL: &'static str = "EMAIL"; + const VERSION: &'static str = env!("CARGO_PKG_VERSION"); + const AUDIO_IO_LAYOUTS: &'static [AudioIOLayout] = &[]; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; + type SysExMessage = (); + type BackgroundTask = (); + fn params (&self) -> Arc { + self.params.clone() + } + fn editor (&mut self, _async_executor: AsyncExecutor) -> Option> { + None + } + fn initialize ( + &mut self, _: &AudioIOLayout, _: &BufferConfig, _: &mut impl InitContext, + ) -> bool { + todo!("initialize"); + true + } + fn reset (&mut self) { + todo!("reset"); + } + fn process ( + &mut self, _: &mut Buffer, _: &mut AuxiliaryBuffers, _: &mut impl ProcessContext + ) -> ProcessStatus { + todo!("process"); + ProcessStatus::Normal + } +} +impl ClapPlugin for VestalWrapper { + const CLAP_ID: &'static str = "ID"; + const CLAP_DESCRIPTION: Option<&'static str> = Some("DESC"); + const CLAP_MANUAL_URL: Option<&'static str> = Some(Self::URL); + const CLAP_SUPPORT_URL: Option<&'static str> = None; + const CLAP_FEATURES: &'static [ClapFeature] = &[]; +} +impl Vst3Plugin for VestalWrapper { + const VST3_CLASS_ID: [u8; 16] = *b"VESTAL_________."; + const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[]; +} +nih_export_clap!(VestalWrapper); +nih_export_vst3!(VestalWrapper);