Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

feat: support wasm32 target #26

Merged
merged 6 commits into from
Aug 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@ description = "Fuel cryptographic primitives."
borrown = "0.1"
fuel-types = { version = "0.5", default-features = false }
lazy_static = { version = "1.4", optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
sha2 = { version = "0.9", default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
Br1ght0ne marked this conversation as resolved.
Show resolved Hide resolved
# the deterministic arguments of the signature (key, nonce, message), as defined in the RFC-6979
Br1ght0ne marked this conversation as resolved.
Show resolved Hide resolved
rand = { version = "0.8", default-features = false, features = ["alloc"], optional = true }
Br1ght0ne marked this conversation as resolved.
Show resolved Hide resolved
Br1ght0ne marked this conversation as resolved.
Show resolved Hide resolved
secp256k1 = { version = "0.20", default-features = false, features = [ "alloc", "rand", "recovery" ], optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rand = { version = "0.8", default-features = false, features = ["std_rng"], optional = true }
# `rand-std` is used to further protect the blinders from side-channel attacks and won't compromise
# the deterministic arguments of the signature (key, nonce, message), as defined in the RFC-6979
secp256k1 = { version = "0.20", features = [ "rand-std", "recovery" ], optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
sha2 = { version = "0.9", default-features = false }

[dev-dependencies]
bincode = { version = "1.3", default-features = false }
criterion = "0.3"
fuel-crypto = { path = ".", default-features = false, features = ["random"] }
k256 = { version = "0.10", features = [ "ecdsa" ] }
k256 = { version = "0.10", default-features = false, features = [ "ecdsa" ] }
Br1ght0ne marked this conversation as resolved.
Show resolved Hide resolved
rand = { version = "0.8", default-features = false, features = ["std_rng"] }
sha2 = "0.9"

Expand Down