feat(data,engine): implement NativeStorage and WasmStorage backends (closes #48)
Build and Deploy / build-and-push (push) Successful in 3m59s
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user