From 9c11f6cb7b739e2453c5e9d47c20641581474b88 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Sun, 19 Dec 2021 18:02:22 +0200 Subject: [PATCH] fix(ethers): auto-enable asm when supported (x86/x64 and not msvc) (#710) --- Cargo.toml | 3 +++ ethers-solc/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7b07c0d8..b2be91df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,6 +92,9 @@ ethers-etherscan = { version = "^0.2.0", default-features = false, path = "./eth ethers-contract = { version = "^0.6.0", default-features = false, path = "./ethers-contract", features = ["abigen", "eip712"] } ethers-providers = { version = "^0.6.0", default-features = false, path = "./ethers-providers", features = ["ws"] } +[target.'cfg(all(any(target_arch = "x86", target_arch = "x86_64"), not(target_env = "msvc")))'.dependencies] +ethers-solc = { version = "^0.1.0", default-features = false, path = "./ethers-solc", features = ["asm"] } + [target.'cfg(target_family = "unix")'.dev-dependencies] ethers-providers = { version = "^0.6.0", default-features = false, path = "./ethers-providers", features = ["ws", "ipc"] } anyhow = "1.0.39" diff --git a/ethers-solc/Cargo.toml b/ethers-solc/Cargo.toml index 572a123e..019d61d7 100644 --- a/ethers-solc/Cargo.toml +++ b/ethers-solc/Cargo.toml @@ -68,4 +68,4 @@ project-util = ["tempdir", "fs_extra"] tests = [] openssl = ["svm/openssl"] rustls = ["svm/rustls"] -asm = ["sha2/asm"] +asm = ["sha2/asm", "svm/sha2-asm"]