Enable wasmtime only for x86_64 in substrate node (#5432)

* Enable `wasmtime` only for `x86_64` in substrate node

When using the new feature of cargo `cargo build -Z features=itarget`,
the `wasmtime` feature will not bleed into the build for other
architectures.

* Use new cargo feature in CI
This commit is contained in:
Bastian Köcher
2020-03-27 15:54:48 +01:00
committed by GitHub
parent 7abc577017
commit 3ec1d1b491
2 changed files with 7 additions and 8 deletions
+6 -7
View File
@@ -101,6 +101,11 @@ wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.7", optional = true }
browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.8.0-alpha.5"}
[target.'cfg(target_arch="x86_64")'.dependencies]
node-executor = { version = "2.0.0-alpha.4", path = "../executor", features = [ "wasmtime" ] }
sc-cli = { version = "0.8.0-alpha.4", optional = true, path = "../../../client/cli", features = [ "wasmtime" ] }
sc-service = { version = "0.8.0-alpha.4", default-features = false, path = "../../../client/service", features = [ "wasmtime" ] }
[dev-dependencies]
sc-keystore = { version = "2.0.0-alpha.5", path = "../../../client/keystore" }
sc-consensus-babe = { version = "0.8.0-alpha.5", features = ["test-helpers"], path = "../../../client/consensus/babe" }
@@ -130,7 +135,7 @@ version = "3.0.4"
optional = true
[features]
default = ["cli", "wasmtime"]
default = [ "cli" ]
browser = [
"browser-utils",
"wasm-bindgen",
@@ -146,10 +151,4 @@ cli = [
"structopt",
"vergen",
]
wasmtime = [
"cli",
"node-executor/wasmtime",
"sc-cli/wasmtime",
"sc-service/wasmtime",
]
runtime-benchmarks = [ "node-runtime/runtime-benchmarks" ]