From 8aa0346308d82ed99cf436c33f74d076766fcbe8 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 06 May 2022 10:12:39 +0000 Subject: [PATCH] build: only build wasm when needed --- --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -405,6 +405,7 @@ cmd.run(config, partials.client.clone(), db, storage) }), + BenchmarkCmd::Machine(cmd) => runner.sync_run(|config| cmd.run(&config)), BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()), } } --- a/runtime/opal/build.rs +++ b/runtime/opal/build.rs @@ -14,10 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Unique Network. If not, see . -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() + #[cfg(feature = "std")] + substrate_wasm_builder::WasmBuilder::new() .with_current_project() .import_memory() .export_heap_base() --- a/runtime/quartz/build.rs +++ b/runtime/quartz/build.rs @@ -1,7 +1,6 @@ -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() + #[cfg(feature = "std")] + substrate_wasm_builder::WasmBuilder::new() .with_current_project() .import_memory() .export_heap_base() --- a/runtime/unique/build.rs +++ b/runtime/unique/build.rs @@ -1,7 +1,6 @@ -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() + #[cfg(feature = "std")] + substrate_wasm_builder::WasmBuilder::new() .with_current_project() .import_memory() .export_heap_base() -- gitstuff