commit cd05e1e724184056cc914d78c6faa9e5a1d3328d
parent 5d71f18136f69f91077cafbfe6dae3b7ded48823
Author: triesap <tyson@radroots.org>
Date: Fri, 19 Jun 2026 16:16:09 -0700
ffi: rename shared ffi crate
- move the shared UniFFI crate to the language-neutral field_ffi directory.
- rename the Cargo package from radroots_field_ffi_swift to radroots_field_ffi.
- refresh the lockfile with the language-neutral package identity.
- keep Swift binding module configuration separate from shared crate naming.
Diffstat:
8 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -1545,7 +1545,7 @@ dependencies = [
]
[[package]]
-name = "radroots_field_ffi_swift"
+name = "radroots_field_ffi"
version = "0.1.0-alpha.1"
dependencies = [
"radroots_field_core",
diff --git a/Cargo.toml b/Cargo.toml
@@ -1,7 +1,7 @@
[workspace]
members = [
"crates/field_core",
- "crates/field_ffi_swift",
+ "crates/field_ffi",
"crates/field_wasm",
]
resolver = "2"
@@ -17,7 +17,7 @@ readme = "README"
[workspace.dependencies]
radroots_field_core = { path = "crates/field_core", version = "0.1.0-alpha.1", default-features = false }
-radroots_field_ffi_swift = { path = "crates/field_ffi_swift", version = "0.1.0-alpha.1" }
+radroots_field_ffi = { path = "crates/field_ffi", version = "0.1.0-alpha.1" }
radroots_field_wasm = { path = "crates/field_wasm", version = "0.1.0-alpha.1" }
radroots_core = { path = "../lib/crates/core", version = "0.1.0-alpha.2", default-features = false }
radroots_events = { path = "../lib/crates/events", version = "0.1.0-alpha.2", default-features = false }
diff --git a/crates/field_ffi/Cargo.toml b/crates/field_ffi/Cargo.toml
@@ -0,0 +1,25 @@
+[package]
+name = "radroots_field_ffi"
+version.workspace = true
+edition.workspace = true
+authors = ["Radroots Authors"]
+rust-version.workspace = true
+license.workspace = true
+publish = false
+
+[lib]
+crate-type = ["staticlib", "cdylib"]
+
+[lints.rust]
+unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
+
+[[bin]]
+name = "uniffi-bindgen"
+path = "bin/uniffi-bindgen.rs"
+
+[build-dependencies]
+uniffi_build = { workspace = true }
+
+[dependencies]
+radroots_field_core = { workspace = true }
+uniffi = { workspace = true, features = ["cli"] }
diff --git a/crates/field_ffi_swift/bin/uniffi-bindgen.rs b/crates/field_ffi/bin/uniffi-bindgen.rs
diff --git a/crates/field_ffi/src/lib.rs b/crates/field_ffi/src/lib.rs
@@ -0,0 +1,16 @@
+radroots_field_core::uniffi_reexport_scaffolding!();
+
+pub fn coverage_branch_probe(input: bool) -> &'static str {
+ if input { "ffi" } else { "ffi" }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::coverage_branch_probe;
+
+ #[test]
+ fn coverage_branch_probe_hits_both_paths() {
+ assert_eq!(coverage_branch_probe(true), "ffi");
+ assert_eq!(coverage_branch_probe(false), "ffi");
+ }
+}
diff --git a/crates/field_ffi_swift/uniffi.toml b/crates/field_ffi/uniffi.toml
diff --git a/crates/field_ffi_swift/Cargo.toml b/crates/field_ffi_swift/Cargo.toml
@@ -1,25 +0,0 @@
-[package]
-name = "radroots_field_ffi_swift"
-version.workspace = true
-edition.workspace = true
-authors = ["Radroots Authors"]
-rust-version.workspace = true
-license.workspace = true
-publish = false
-
-[lib]
-crate-type = ["staticlib", "cdylib"]
-
-[lints.rust]
-unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
-
-[[bin]]
-name = "uniffi-bindgen"
-path = "bin/uniffi-bindgen.rs"
-
-[build-dependencies]
-uniffi_build = { workspace = true }
-
-[dependencies]
-radroots_field_core = { workspace = true }
-uniffi = { workspace = true, features = ["cli"] }
diff --git a/crates/field_ffi_swift/src/lib.rs b/crates/field_ffi_swift/src/lib.rs
@@ -1,16 +0,0 @@
-radroots_field_core::uniffi_reexport_scaffolding!();
-
-pub fn coverage_branch_probe(input: bool) -> &'static str {
- if input { "ffi-swift" } else { "ffi-swift" }
-}
-
-#[cfg(test)]
-mod tests {
- use super::coverage_branch_probe;
-
- #[test]
- fn coverage_branch_probe_hits_both_paths() {
- assert_eq!(coverage_branch_probe(true), "ffi-swift");
- assert_eq!(coverage_branch_probe(false), "ffi-swift");
- }
-}