mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +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:
@@ -35,7 +35,7 @@ cumulus-primitives-core = { path = "../../primitives/core", default-features = f
|
||||
cumulus-primitives-timestamp = { path = "../../primitives/timestamp", default-features = false }
|
||||
|
||||
[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 }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
@@ -64,5 +64,6 @@ std = [
|
||||
"cumulus-pallet-parachain-system/std",
|
||||
"cumulus-primitives-core/std",
|
||||
"cumulus-primitives-timestamp/std",
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
increment-spec-version = []
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use substrate_wasm_builder::WasmBuilder;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn main() {
|
||||
use substrate_wasm_builder::WasmBuilder;
|
||||
|
||||
WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
@@ -30,3 +31,6 @@ fn main() {
|
||||
.set_file_name("wasm_binary_spec_version_incremented.rs")
|
||||
.build();
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn main() {}
|
||||
|
||||
Reference in New Issue
Block a user