mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
c9bffc13b5
fix #13529 #### PR Dependency Tree * **PR #14481** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Mobile blob caching with file-backed storage for faster loads and reduced network usage * Blob decoding with lazy refresh on token-read failures for improved reliability * Full-text search/indexing exposed to mobile apps * Document sync APIs and peer clock management for robust cross-device sync * **Tests** * Added unit tests covering payload decoding, cache safety, and concurrency * **Dependencies** * Added an LRU cache dependency and a new mobile-shared package for shared mobile logic <!-- end of auto-generated comment: release notes by coderabbit.ai -->
25 lines
722 B
Rust
25 lines
722 B
Rust
mod error;
|
|
mod ffi_types;
|
|
mod payload_codec;
|
|
mod storage;
|
|
#[cfg(test)]
|
|
mod tests;
|
|
|
|
#[cfg(any(target_os = "android", target_os = "ios", test))]
|
|
#[cfg_attr(all(test, not(any(target_os = "android", target_os = "ios"))), allow(dead_code))]
|
|
pub(crate) mod cache;
|
|
use affine_common::hashcash::Stamp;
|
|
pub(crate) use error::Result;
|
|
pub use error::UniffiError;
|
|
pub use ffi_types::{
|
|
Blob, BlockInfo, CrawlResult, DocClock, DocRecord, DocUpdate, ListedBlob, MatchRange, SearchHit, SetBlob,
|
|
};
|
|
pub use storage::{DocStoragePool, new_doc_storage_pool};
|
|
|
|
uniffi::setup_scaffolding!("affine_mobile_native");
|
|
|
|
#[uniffi::export]
|
|
pub fn hashcash_mint(resource: String, bits: u32) -> String {
|
|
Stamp::mint(resource, Some(bits)).format()
|
|
}
|