Skip to content

Commit

Permalink
make wasm related denpendencies optional and add them to js feature
Browse files Browse the repository at this point in the history
  • Loading branch information
0xshawn committed Oct 17, 2024
1 parent c339752 commit d3f0e9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ serde_json = { version = "1.0.108", optional = true, features = [
] }
tracing = { version = "0.1", optional = true }
futures = { version = "0.3", optional = true }
getrandom = { version = "0.2", features = ["js"] }
serde-wasm-bindgen = "0.4"
wasm-bindgen = "0.2.95"
serde_bytes = "0.11"
getrandom = { version = "0.2", optional = true, features = ["js"] }
serde-wasm-bindgen = { version = "0.4", optional = true}
wasm-bindgen = { version = "0.2.95", optional = true }
serde_bytes = { version = "0.11", optional = true }

[dependencies.webpki]
version = "0.102.8"
Expand Down Expand Up @@ -81,4 +81,4 @@ std = [
"urlencoding",
]
report = ["std", "tracing", "futures"]
js = ["ring/wasm32_unknown_unknown_js"]
js = ["ring/wasm32_unknown_unknown_js", "getrandom", "serde-wasm-bindgen", "wasm-bindgen", "serde_bytes"]
1 change: 1 addition & 0 deletions src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub struct VerifiedReport {
pub report: Report,
}

#[cfg(feature = "js")]
#[wasm_bindgen]
pub fn js_verify(
raw_quote: JsValue,
Expand Down

0 comments on commit d3f0e9d

Please sign in to comment.