commit ce11fb632bf4c8ec33b0e14d01c8c22969b67caa
parent 39a9878b7d4ed939cf2c81214d007acff27ce7ee
Author: triesap <tyson@radroots.org>
Date: Sun, 9 Aug 2026 15:32:42 +0000
mobile: run exported futures in the Tokio context
- mark the complete UniFFI runtime surface as Tokio-compatible
- enable UniFFI's supported async runtime adapter
- preserve the foreign executor API and existing generated-language signatures
- verify mobile FFI tests, Clippy, formatting, and architecture contracts
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/crates/tera_ffi/Cargo.toml b/core/crates/tera_ffi/Cargo.toml
@@ -32,7 +32,7 @@ tracing = { workspace = true }
tracing-appender = { workspace = true }
tracing-subscriber = { workspace = true }
thiserror = { workspace = true }
-uniffi = { workspace = true }
+uniffi = { workspace = true, features = ["tokio"] }
[target.'cfg(unix)'.dependencies]
rustix = { workspace = true }
diff --git a/core/crates/tera_ffi/src/runtime.rs b/core/crates/tera_ffi/src/runtime.rs
@@ -43,7 +43,7 @@ pub struct RadrootsRuntime {
subscriptions: Arc<SubscriptionHub>,
}
-#[cfg_attr(not(coverage_nightly), uniffi::export)]
+#[cfg_attr(not(coverage_nightly), uniffi::export(async_runtime = "tokio"))]
impl RadrootsRuntime {
#[cfg_attr(not(coverage_nightly), uniffi::constructor)]
pub async fn new(