Skip to content

Commit

Permalink
feat: add asm-keccak feature (#6941)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Jan 30, 2024
1 parent 74938a0 commit b78289a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,16 @@ jobs:
env:
SVM_TARGET_PLATFORM: ${{ matrix.svm_target_platform }}
shell: bash
# Windows runs out of RAM when building binaries with LLVM
run: |
flags=()
[[ "${{ matrix.target }}" == *windows* ]] && flags+=(-j1)
cargo build --release --bins --target ${{ matrix.target }} "${flags[@]}"
target="${{ matrix.target }}"
flags=()
# `keccak-asm` does not support MSVC or aarch64 Linux.
[[ "$target" != *msvc* && "$target" != "aarch64-unknown-linux-gnu" ]] && flags+=(--features=asm-keccak)
# Windows runs out of RAM when building binaries with LLVM
[[ "$target" == *windows* ]] && flags+=(-j1)
cargo build --release --bins --target "${{ matrix.target }}" "${flags[@]}"
- name: Archive binaries
id: artifacts
Expand Down
1 change: 1 addition & 0 deletions crates/anvil/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ crc = "3.0.1"
default = ["cli"]
cmd = ["clap", "clap_complete", "ctrlc", "anvil-server/clap"]
cli = ["tokio/full", "cmd", "fdlimit"]
asm-keccak = ["alloy-primitives/asm-keccak"]
1 change: 1 addition & 0 deletions crates/cast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ criterion = "0.5"
default = ["rustls"]
rustls = ["foundry-cli/rustls"]
openssl = ["foundry-cli/openssl"]
asm-keccak = ["alloy-primitives/asm-keccak"]

[[bench]]
name = "vanity"
Expand Down
1 change: 1 addition & 0 deletions crates/chisel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ serial_test = "2"
default = ["rustls"]
rustls = ["reqwest/rustls-tls", "reqwest/rustls-tls-native-roots"]
openssl = ["foundry-compilers/openssl", "reqwest/default-tls"]
asm-keccak = ["alloy-primitives/asm-keccak"]

[[bench]]
name = "session_source"
Expand Down
17 changes: 4 additions & 13 deletions crates/forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ name = "forge"
path = "bin/main.rs"

[build-dependencies]
vergen = { version = "8", default-features = false, features = [
"build",
"git",
"git2",
] }
vergen = { version = "8", default-features = false, features = ["build", "git", "git2"] }

[dependencies]
# lib
Expand Down Expand Up @@ -96,20 +92,15 @@ paste = "1.0"
path-slash = "0.2"
pretty_assertions.workspace = true
serial_test = "2"
svm = { package = "svm-rs", version = "0.3", default-features = false, features = [
"rustls",
] }
svm = { package = "svm-rs", version = "0.3", default-features = false, features = ["rustls"] }
tempfile = "3"
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }

[features]
default = ["rustls"]
rustls = [
"foundry-cli/rustls",
"reqwest/rustls-tls",
"reqwest/rustls-tls-native-roots",
]
rustls = ["foundry-cli/rustls", "reqwest/rustls-tls", "reqwest/rustls-tls-native-roots"]
openssl = ["foundry-cli/openssl", "reqwest/default-tls"]
asm-keccak = ["alloy-primitives/asm-keccak"]

# feature for heavy (long-running) integration tests
heavy-integration-tests = []
Expand Down

0 comments on commit b78289a

Please sign in to comment.