mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Build the standard library crates when building the runtimes (#2217)
Our executor currently only supports the WASM MVP feature set, however nowadays when compiling WASM the Rust compiler has more features enabled by default. We do set the `-C target-cpu=mvp` flag to make sure that *our* code gets compiled in a way that is compatible with our executor, however this doesn't affect Rust's standard library crates (`std`, `core` and `alloc`) which are by default precompiled and still can make use of these extra features. So in this PR we force the compiler to also compile the standard library crates for us to make sure that they also only use the MVP features. I've added the `WASM_BUILD_STD` environment variable which can be used to disable this behavior if set to `0`. Unfortunately this *will* slow down the compile times when building runtimes, but there isn't much that we can do about that. Fixes https://github.com/paritytech/polkadot-sdk/issues/1755 --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -212,4 +212,21 @@ mod tests {
|
||||
version_1_69_0,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_rustc_version() {
|
||||
let version = Version::extract("rustc 1.73.0 (cc66ad468 2023-10-03)").unwrap();
|
||||
assert_eq!(
|
||||
version,
|
||||
Version {
|
||||
major: 1,
|
||||
minor: 73,
|
||||
patch: 0,
|
||||
is_nightly: false,
|
||||
year: Some(2023),
|
||||
month: Some(10),
|
||||
day: Some(03),
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user