mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 20:38:04 +00:00
Improve build times by disabling wasm-builder in no_std (#2308)
There is no need to compile wasm-builder in `no_std` as we skip the compilation of the crate any way. So, we can also directly disable wasm-builder as dependency in `no_std` to improve build times.
This commit is contained in:
@@ -12,7 +12,7 @@ edition = "2021"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
||||
@@ -121,6 +121,7 @@ std = [
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
|
||||
runtime-benchmarks = [
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
use substrate_wasm_builder::WasmBuilder;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn main() {
|
||||
WasmBuilder::new()
|
||||
substrate_wasm_builder::WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
.import_memory()
|
||||
.build()
|
||||
}
|
||||
|
||||
/// The wasm builder is deactivated when compiling
|
||||
/// this crate for wasm to speed up the compilation.
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn main() {}
|
||||
|
||||
Reference in New Issue
Block a user