feat(data,engine): implement NativeStorage and WasmStorage backends (closes #48)
Build and Deploy / build-and-push (push) Successful in 3m59s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
funman300
2026-05-27 17:30:35 -07:00
parent a8ceed97a9
commit 561395fca6
5 changed files with 291 additions and 5 deletions
+8 -4
View File
@@ -1,11 +1,15 @@
//! Platform abstraction layer.
//!
//! Traits defined here are implemented by:
//! - `solitaire_data` for native targets (filesystem, `std::time`)
//! - future WASM-specific impls for browser targets (`localStorage`, `js_sys::Date`)
//! Traits defined here are implemented per target:
//! - native builds use filesystem-backed storage
//! - browser builds use `localStorage`
pub mod storage;
pub mod time;
pub use storage::StorageBackend;
#[cfg(not(target_arch = "wasm32"))]
pub use storage::NativeStorage;
#[cfg(target_arch = "wasm32")]
pub use storage::WasmStorage;
pub use storage::{StorageBackend, StorageBackendResource, default_storage_backend};
pub use time::PlatformTime;