Skip to content

Commit

Permalink
feat: only use substrate-wasm-builder when std feature is enabled (po…
Browse files Browse the repository at this point in the history
  • Loading branch information
koushiro authored Feb 10, 2023
1 parent abc025a commit 898580c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pallet-evm-precompile-simple = { workspace = true }
pallet-hotfix-sufficients = { workspace = true }

[build-dependencies]
substrate-wasm-builder = { workspace = true }
substrate-wasm-builder = { workspace = true, optional = true }

[features]
default = ["std", "with-rocksdb-weights"]
Expand All @@ -78,6 +78,7 @@ std = [
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
# Substrate FRAME
"frame-benchmarking/std",
"frame-executive/std",
Expand Down
5 changes: 2 additions & 3 deletions template/runtime/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use substrate_wasm_builder::WasmBuilder;

fn main() {
WasmBuilder::new()
#[cfg(feature = "std")]
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
Expand Down

0 comments on commit 898580c

Please sign in to comment.