New crate crates/kv-wasm runs the same crypto, item model and sync engine in the browser: - WebStore: in-memory replica of kv-store's Store, each changed entry written to IndexedDB (ciphertext only) before the JS call resolves. - Device key: non-extractable WebCrypto ECDSA P-256 key in IndexedDB (raw r||s signatures). - WebCore mirrors kv-ffi's VaultCore; wasm-bindgen surface in camelCase with TypeScript types, plus a Web Worker wrapper (connectVault) so Argon2id never blocks the page. - Tests: Chrome (IndexedDB, WebCrypto, RFC 9421 verify), shared envelope fixtures both ways with kv-ffi, native sync with kv-ffi via the test server, Node smoke of the built package. Small changes to shared crates so they build for wasm32: - kv-store: SqliteStore moved to a native-only module. - kv-sync: rustls/pinning/tokio native only (fetch on wasm); DeviceSigner::sign_async (default wraps sign) used by ApiClient; unix_now() instead of SystemTime/now_utc. - kv-model: Public Suffix List behind a default `psl` feature (kv-ffi keeps it; the web build drops ~0.9 MB of code and matches same-host only). - wasm-release profile (opt-level z, Argon2 at 3) and a wasm CI job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
79 lines
2.4 KiB
TOML
79 lines
2.4 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = ["crates/*"]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "Apache-2.0"
|
|
rust-version = "1.88"
|
|
publish = false
|
|
|
|
[workspace.dependencies]
|
|
kv-proto = { path = "crates/kv-proto" }
|
|
kv-crypto = { path = "crates/kv-crypto" }
|
|
# The `psl` feature (eTLD+1 matching, ~0.9 MB of code) is enabled by kv-ffi; the web build leaves it out.
|
|
kv-model = { path = "crates/kv-model", default-features = false }
|
|
kv-store = { path = "crates/kv-store" }
|
|
kv-sync = { path = "crates/kv-sync" }
|
|
kv-import = { path = "crates/kv-import" }
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
thiserror = "2"
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
base64 = "0.22"
|
|
rand = "0.8"
|
|
rand_core = { version = "0.6", features = ["getrandom"] }
|
|
zeroize = { version = "1", features = ["derive"] }
|
|
argon2 = "0.5"
|
|
hkdf = "0.12"
|
|
hmac = "0.12"
|
|
sha1 = "0.10"
|
|
sha2 = "0.10"
|
|
chacha20poly1305 = "0.10"
|
|
hpke = "0.12"
|
|
ed25519-dalek = { version = "2", features = ["rand_core", "zeroize"] }
|
|
unicode-normalization = "0.1"
|
|
data-encoding = "2"
|
|
url = "2"
|
|
psl = "2"
|
|
uniffi = "0.28"
|
|
rusqlite = { version = "0.32", features = ["bundled"] }
|
|
opaque-ke = { version = "3", features = ["std"] }
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-manual-roots-no-provider", "http2"] }
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "logging"] }
|
|
webpki-roots = "0.26"
|
|
rustls-webpki = { version = "0.103", default-features = false, features = ["alloc", "ring"] }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "sync", "net", "io-util"] }
|
|
ciborium = "0.2"
|
|
blake3 = "1"
|
|
p256 = { version = "0.13", features = ["ecdsa", "pkcs8"] }
|
|
time = { version = "0.3", features = ["formatting"] }
|
|
wiremock = "0.6"
|
|
rcgen = "0.13"
|
|
tokio-rustls = { version = "0.26", default-features = false, features = ["ring"] }
|
|
tempfile = "3"
|
|
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|
|
panic = "abort"
|
|
strip = true
|
|
|
|
# Argon2 at 64 MiB is painfully slow unoptimized; keep debug test runs fast.
|
|
[profile.dev.package.argon2]
|
|
opt-level = 3
|
|
[profile.dev.package.blake2]
|
|
opt-level = 3
|
|
|
|
# Web vault (`wasm-pack build crates/kv-wasm --profile wasm-release`): optimize for download size,
|
|
# but keep Argon2id's hot loop at full speed.
|
|
[profile.wasm-release]
|
|
inherits = "release"
|
|
opt-level = "z"
|
|
[profile.wasm-release.package.argon2]
|
|
opt-level = 3
|
|
[profile.wasm-release.package.blake2]
|
|
opt-level = 3
|