diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2664f0369dcf..fee941b987d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/crates/anvil/Cargo.toml b/crates/anvil/Cargo.toml index 3a3168ddf723..21633df0c09a 100644 --- a/crates/anvil/Cargo.toml +++ b/crates/anvil/Cargo.toml @@ -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"] diff --git a/crates/cast/Cargo.toml b/crates/cast/Cargo.toml index 5c6066592ac8..58c5786b38ca 100644 --- a/crates/cast/Cargo.toml +++ b/crates/cast/Cargo.toml @@ -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" diff --git a/crates/chisel/Cargo.toml b/crates/chisel/Cargo.toml index b5b3a2167c0e..0fec11be9531 100644 --- a/crates/chisel/Cargo.toml +++ b/crates/chisel/Cargo.toml @@ -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" diff --git a/crates/forge/Cargo.toml b/crates/forge/Cargo.toml index 46d448a65601..ac120687da2f 100644 --- a/crates/forge/Cargo.toml +++ b/crates/forge/Cargo.toml @@ -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 @@ -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 = []