Skip to content

Commit

Permalink
add multithreading support
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDonavon committed Mar 7, 2023
1 parent 162b01e commit 8792730
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 12 additions & 2 deletions wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ features = [ "preserve_order" ]
path="../../snarkVM/synthesizer"
version = "0.9.13"
default-features = false
features = [ "wasm" ]
features = [ "wasm", "parallel", "web" ]

[dependencies.snarkvm-console]
path="../../snarkVM/console"
version = "0.9.13"
default-features = false
features = ["parallel"]

[dependencies.snarkvm-wasm]
path="../../snarkVM/wasm"
Expand Down Expand Up @@ -82,12 +83,21 @@ version = "0.1.7"
[dependencies.rand_chacha]
version = "0.3.1"

[dependencies.wasm-bindgen-rayon]
version = "1.0"

[dependencies.rayon]
version = "1.5"

[dev-dependencies.wasm-bindgen-test]
version = "0.3.33"

[profile.release]
opt-level = 3
lto = true

[package.metadata.wasm-pack.profile.debug]
wasm-opt = ["-O4"]

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4", "--fast-math"]
wasm-opt = ["-O4"]
1 change: 1 addition & 0 deletions wasm/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly-2022-12-12
2 changes: 2 additions & 0 deletions wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ pub mod program;
pub use program::*;

pub(crate) mod types;

pub use wasm_bindgen_rayon::init_thread_pool;

0 comments on commit 8792730

Please sign in to comment.