fix: enable getrandom js feature for WASM compilation
The getrandom crate (transitive dep via rand/argon2) requires the "js" feature flag to compile for wasm32-unknown-unknown targets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -552,8 +552,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"wasi",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -625,6 +627,7 @@ name = "idfoto-wasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"data-encoding",
|
||||
"getrandom",
|
||||
"hmac",
|
||||
"idfoto-core",
|
||||
"js-sys",
|
||||
|
||||
@@ -15,6 +15,7 @@ serde_json = "1"
|
||||
hmac = "0.12"
|
||||
sha1 = "0.10"
|
||||
data-encoding = "2"
|
||||
getrandom = { version = "0.2", features = ["js"] }
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3"
|
||||
|
||||
Reference in New Issue
Block a user