Skip to content

Commit

Permalink
Wasm support (#139)
Browse files Browse the repository at this point in the history
* Add wasm build

* Add nix flake

Upgrade crates and nix setup

* Fix compilation

Wasm support

* remove nix

* remove .envrc

* update ec-gpu to build correctly

* remove futhark

* Remove triton dependency

* Revert .gitignore

* update bellperson, ec-gpu

* update rust-toolchain

* Fix Ubuntu build

* toolchain version and bellperson features per comments

Co-authored-by: John C. Burnham <jcb@johnchandlerburnham.com>
Co-authored-by: Samuel Burnham <samuel.burnham@gmail.com>
  • Loading branch information
3 people authored Apr 22, 2022
1 parent 906b040 commit 8994659
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ resolver = "2"

[dependencies]
lazy_static = "1.4.0"
bellperson = "0.19.0"
bellperson = { version = "0.20", default-features = false }
blake2s_simd = "0.5"
blstrs = "0.4.0"
blstrs = { version = "0.4.2" }
byteorder = "1"
ec-gpu = { version = "0.1.0", optional = true }
ec-gpu-gen = { version = "0.1.0", optional = true }
Expand All @@ -32,7 +32,7 @@ serde_json = "1.0.53"
pasta_curves = "0.2.1"

[build-dependencies]
blstrs = "0.4.0"
blstrs = "0.4.2"
ec-gpu = { version = "0.1.0", optional = true }
ec-gpu-gen = { version = "0.1.0", optional = true }
execute = "0.2.9"
Expand All @@ -52,7 +52,7 @@ incremental = false
codegen-units = 1

[features]
default = []
default = [ "bellperson/default" ]
cuda = ["rust-gpu-tools/cuda", "blstrs/gpu", "ec-gpu-gen", "ec-gpu"]
opencl = ["rust-gpu-tools/opencl", "blstrs/gpu", "ec-gpu-gen", "ec-gpu"]
# The supported arities for Poseidon running on the GPU are specified at compile-time.
Expand All @@ -65,6 +65,7 @@ arity24 = []
arity36 = []
# With this feature set, also the strengthened version of the kernel will be compiled.
strengthened = []
wasm = [ "bellperson/wasm" ]

[workspace]
members = [
Expand Down
6 changes: 3 additions & 3 deletions gbench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"

[dependencies]
lazy_static = "1.4.0"
bellperson = "0.18.0"
bellperson = { version = "0.20.0", default-features = false }
blake2s_simd = "0.5"
byteorder = "1"
env_logger = "0.7.1"
Expand All @@ -22,5 +22,5 @@ blstrs = "0.4.0"

[features]
default = ["opencl"]
cuda = ["neptune/cuda", "rust-gpu-tools/cuda"]
opencl = ["neptune/opencl", "rust-gpu-tools/opencl"]
cuda = ["neptune/cuda", "bellperson/cuda", "rust-gpu-tools/cuda"]
opencl = ["neptune/opencl", "bellperson/opencl", "rust-gpu-tools/opencl"]

0 comments on commit 8994659

Please sign in to comment.