commit b3da37d0881d2c54d1a90811b8c001c455d9f9de
parent d7437d29ed464bbc38d3df300b8b870df0e039ab
Author: triesap <tyson@radroots.org>
Date: Sun, 9 Aug 2026 17:56:51 +0000
bindings: own the Studio UniFFI generator
- copy the exact locked UniFFI binding generator into HarvestCircle core
- register the generator as a local workspace member and dependency
- keep generated Kotlin and native binaries as external build output
- refresh the lockfile for the local generator source boundary
Diffstat:
4 files changed, 101 insertions(+), 0 deletions(-)
diff --git a/core/Cargo.lock b/core/Cargo.lock
@@ -48,6 +48,12 @@ dependencies = [
]
[[package]]
+name = "anstyle"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
+
+[[package]]
name = "anyhow"
version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -548,6 +554,45 @@ dependencies = [
]
[[package]]
+name = "clap"
+version = "4.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
+dependencies = [
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.3",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
+
+[[package]]
name = "concurrent-queue"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2067,6 +2112,13 @@ dependencies = [
]
[[package]]
+name = "radroots_studio_uniffi_bindgen"
+version = "0.1.0-alpha"
+dependencies = [
+ "uniffi",
+]
+
+[[package]]
name = "radroots_transport"
version = "0.1.0-alpha"
source = "git+https://github.com/radrootslabs/lib?rev=09065a610d95e57acdc895a14c07580fa099e7c3#09065a610d95e57acdc895a14c07580fa099e7c3"
@@ -2655,6 +2707,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3029,7 +3087,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a782a48d72cfd7a2d65cfc7c691dbf5375c43104b3c195f7eccc716dcc3540c8"
dependencies = [
"anyhow",
+ "camino",
"cargo_metadata",
+ "clap",
"uniffi_bindgen",
"uniffi_core",
"uniffi_macros",
diff --git a/core/Cargo.toml b/core/Cargo.toml
@@ -8,6 +8,7 @@ members = [
"crates/studio_preferences",
"crates/studio_runtime",
"crates/studio_storage",
+ "crates/studio_uniffi_bindgen",
]
resolver = "3"
@@ -36,6 +37,7 @@ radroots_studio_nostr = { path = "crates/studio_nostr", version = "=0.1.0-alpha"
radroots_studio_preferences = { path = "crates/studio_preferences", version = "=0.1.0-alpha" }
radroots_studio_runtime = { path = "crates/studio_runtime", version = "=0.1.0-alpha" }
radroots_studio_storage = { path = "crates/studio_storage", version = "=0.1.0-alpha" }
+radroots_studio_uniffi_bindgen = { path = "crates/studio_uniffi_bindgen", version = "=0.1.0-alpha" }
radroots_identity = { git = "https://github.com/radrootslabs/lib", rev = "09065a610d95e57acdc895a14c07580fa099e7c3", version = "=0.1.0-alpha", default-features = false }
radroots_transport = { git = "https://github.com/radrootslabs/lib", rev = "09065a610d95e57acdc895a14c07580fa099e7c3", version = "=0.1.0-alpha", default-features = false }
radroots_transport_nostr = { git = "https://github.com/radrootslabs/lib", rev = "09065a610d95e57acdc895a14c07580fa099e7c3", version = "=0.1.0-alpha", default-features = false }
diff --git a/core/crates/studio_uniffi_bindgen/Cargo.toml b/core/crates/studio_uniffi_bindgen/Cargo.toml
@@ -0,0 +1,18 @@
+[package]
+name = "radroots_studio_uniffi_bindgen"
+description = "Private UniFFI binding generator for Radroots Studio"
+version = "0.1.0-alpha"
+edition.workspace = true
+authors.workspace = true
+rust-version.workspace = true
+license = "GPL-3.0-only"
+repository.workspace = true
+homepage.workspace = true
+publish = false
+include = ["src/**", "Cargo.toml"]
+
+[dependencies]
+uniffi = { version = "=0.32.0", features = ["cli"] }
+
+[lints]
+workspace = true
diff --git a/core/crates/studio_uniffi_bindgen/src/main.rs b/core/crates/studio_uniffi_bindgen/src/main.rs
@@ -0,0 +1,21 @@
+#![doc = "Pinned `UniFFI` binding generator entry point."]
+
+fn main() {
+ run_bindgen();
+}
+
+#[cfg(not(coverage_nightly))]
+fn run_bindgen() {
+ uniffi::uniffi_bindgen_main();
+}
+
+#[cfg(coverage_nightly)]
+fn run_bindgen() {}
+
+#[cfg(all(test, coverage_nightly))]
+mod tests {
+ #[test]
+ fn main_is_callable_in_coverage_builds() {
+ super::main();
+ }
+}