Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add asm-keccak feature #6941

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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: 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
Loading