android fixes

This commit is contained in:
yves committed 2026-11-21 00:09:15 +01:00
1 parent c30fddb1ef
commit 5532a7ce06
7 files changed
+101 -4

No files matched your search

+1
View File
@@ -39,6 +39,7 @@ use meow_store::{Batch, RetiredMailbox, SpaceId, State as SpaceState, Store};
pub use background::{BackgroundOptions, ClientHandle};
pub use meow_core::contact::ContactState as State;
pub use meow_core::server::ServerInfo;
pub use meow_proto::PROTOCOL_VERSION;
pub use meow_store::{Content, HistoryEntry, HistoryPage, PendingAck, Settings, Status};
pub use outbox::{PendingSend, RetryPolicy};
+11
View File
@@ -40,6 +40,17 @@ async fn run<T: Send + 'static>(f: impl Future<Output = Result<T>> + Send + 'sta
.map_err(|e| anyhow!("internal task failed: {e}"))?
}
/// Version of the Rust core and protocol, e.g. `"meow 0.2.0 / protocol v2"`. Cheap and
/// synchronous: also a check that the native library is loaded.
#[frb(sync)]
pub fn core_version() -> String {
format!(
"meow {} / protocol v{}",
env!("CARGO_PKG_VERSION"),
meow_client::PROTOCOL_VERSION
)
}
/// Called once by the generated Dart `RustLib.init()`.
#[frb(init)]
pub fn init_app() {
+27 -2
View File
@@ -40,7 +40,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
default_rust_auto_opaque = RustAutoOpaqueMoi,
);
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.13.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1730797236;
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1531542945;
// Section: executor
@@ -1436,6 +1436,30 @@ fn wire__crate__api__meow__Meow_unlock_impl(
},
)
}
fn wire__crate__api__meow__core_version_impl(
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
rust_vec_len_: i32,
data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
flutter_rust_bridge::for_generated::TaskInfo {
debug_name: "core_version",
port: None,
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
},
move || {
let message = unsafe {
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_)
};
let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message);
deserializer.end();
transform_result_sse::<_, ()>((move || {
let output_ok = Ok::<_, ()>(crate::api::meow::core_version())?;
std::result::Result::Ok(output_ok)
})())
},
)
}
fn wire__crate__api__meow__init_app_impl(
port_: flutter_rust_bridge::for_generated::MessagePort,
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
@@ -1955,7 +1979,7 @@ fn pde_ffi_dispatcher_primary_impl(
28 => wire__crate__api__meow__Meow_set_settings_impl(port, ptr, rust_vec_len, data_len),
29 => wire__crate__api__meow__Meow_settings_impl(port, ptr, rust_vec_len, data_len),
30 => wire__crate__api__meow__Meow_unlock_impl(port, ptr, rust_vec_len, data_len),
31 => wire__crate__api__meow__init_app_impl(port, ptr, rust_vec_len, data_len),
32 => wire__crate__api__meow__init_app_impl(port, ptr, rust_vec_len, data_len),
_ => unreachable!(),
}
}
@@ -1968,6 +1992,7 @@ fn pde_ffi_dispatcher_sync_impl(
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
match func_id {
31 => wire__crate__api__meow__core_version_impl(ptr, rust_vec_len, data_len),
_ => unreachable!(),
}
}