- Remove hardcoded dependencies in kvstore Cargo.toml; use features instead. This allows for more flexible compilation for different targets (native vs. WASM). - Improve logging in vault crate using the `log` crate. This makes debugging easier and provides more informative output during execution. Native tests use `env_logger`, WASM tests use `console_log`. - Update README to reflect new logging best practices. - Add cfg attributes to native and wasm modules to improve clarity. - Update traits.rs to specify Send + Sync behavior expectations.
29 lines
518 B
TOML
29 lines
518 B
TOML
[package]
|
|
name = "kvstore"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
async-trait = "0.1"
|
|
js-sys = "0.3"
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
thiserror = "1"
|
|
tempfile = "3"
|
|
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
sled = { version = "0.34" }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
idb = { version = "0.4" }
|
|
wasm-bindgen-test = "0.3"
|
|
|
|
[features]
|
|
default = []
|
|
native = []
|