[package] name = "thoughtsync-ffi" version = "0.1.0" description = "uniffi bindings exposing thoughtsync-core to the native Android client" authors = ["bvandeusen"] edition = "2021" [lib] # cdylib is the `.so` Android's System.loadLibrary opens. `lib` alongside it so the # bindgen binary below — and this crate's own tests — can use the crate normally; # a cdylib-only crate is unusable from Rust. crate-type = ["cdylib", "lib"] name = "thoughtsync_ffi" [dependencies] thoughtsync-core = { path = "../../core" } serde_json = { workspace = true } log = { workspace = true } # tokio lets an exported `async fn` be driven by a tokio runtime, which the sync # engine needs: it is reqwest all the way down. uniffi = { version = "0.32", features = ["tokio"] } # reqwest requires a reactor; uniffi's `async_runtime = "tokio"` needs one to exist. # rt-multi-thread rather than current_thread: a sync cycle is network-bound and a # Compose UI may have more than one call in flight. tokio = { version = "1", features = ["rt-multi-thread"] } # Display + Error impls for the error enum uniffi turns into a Kotlin exception. thiserror = "2"