Skip to content

Commit

Permalink
move asm to default and add a note
Browse files Browse the repository at this point in the history
  • Loading branch information
srinathsetty committed Feb 7, 2024
1 parent 5df3173 commit be5785e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: build
args: --target wasm32-unknown-unknown
args: --no-default-features --target wasm32-unknown-unknown

test:
runs-on: ubuntu-latest
Expand Down
10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ subtle = "2.5"
pasta_curves = { version = "0.5", features = ["repr-c", "serde"] }
halo2curves = { version = "0.6.0", features = ["bits", "derive_serde"] }
neptune = { version = "13.0.0", default-features = false }
generic-array = "0.14"
generic-array = "1.0.0"
num-bigint = { version = "0.4", features = ["serde", "rand"] }
num-traits = "0.2"
num-integer = "0.1"
Expand All @@ -41,14 +41,13 @@ itertools = "0.12.0"
pasta-msm = { version = "0.1.4" }

[target.'cfg(target_arch = "wasm32")'.dependencies]
# see https://github.com/rust-random/rand/pull/948
getrandom = { version = "0.2.0", default-features = false, features = ["js"] }

[dev-dependencies]
criterion = { version = "0.4", features = ["html_reports"] }
criterion = { version = "0.5", features = ["html_reports"] }
flate2 = "1.0"
hex = "0.4.3"
pprof = { version = "0.11" }
pprof = { version = "0.13" }
cfg-if = "1.0.0"
sha2 = "0.10.7"
proptest = "1.2.0"
Expand Down Expand Up @@ -76,8 +75,7 @@ name = "ppsnark"
harness = false

[features]
default = []
asm = ["halo2curves/asm"]
default = ["halo2curves/asm"]
# Compiles in portable mode, w/o ISA extensions => binary can be executed on all systems.
portable = ["pasta-msm/portable"]
cuda = ["neptune/cuda", "neptune/pasta", "neptune/arity24"]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ A front-end is a tool to take a high-level program and turn it into an intermedi
In the future, we plan to support [Noir](https://noir-lang.org/), a Rust-like DSL and a compiler to transform those programs into an IR. See [this](https://github.com/microsoft/Nova/issues/275) GitHub issue for details.

## Tests and examples
By default, we enable the `asm` feature of an underlying library (which boosts performance by up to 50\%). If the library fails to build or run, one can pass `--no-default-features` to `cargo` commands noted below.

To run tests (we recommend the release mode to drastically shorten run times):
```text
cargo test --release
```

To run example:
To run an example:
```text
cargo run --release --example minroot
```
Expand Down

0 comments on commit be5785e

Please sign in to comment.