diff --git a/substrate/core/sr-std/without_std.rs b/substrate/core/sr-std/without_std.rs index ed9eea6c31..134cc25c94 100755 --- a/substrate/core/sr-std/without_std.rs +++ b/substrate/core/sr-std/without_std.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -#[cfg(feature = "nightly")] #[doc(hidden)] pub extern crate alloc; diff --git a/substrate/core/utils/wasm-builder/src/prerequisites.rs b/substrate/core/utils/wasm-builder/src/prerequisites.rs index eeac6df33e..0c41dff6c8 100644 --- a/substrate/core/utils/wasm-builder/src/prerequisites.rs +++ b/substrate/core/utils/wasm-builder/src/prerequisites.rs @@ -16,6 +16,7 @@ use std::{process::{Command, Stdio}, fs}; +use std::env; use tempfile::tempdir; /// Checks that all prerequisites are installed. @@ -23,7 +24,7 @@ use tempfile::tempdir; /// # Returns /// Returns `None` if everything was found and `Some(ERR_MSG)` if something could not be found. pub fn check() -> Option<&'static str> { - if !check_nightly_installed() { + if !rustc_stable_forced_to_nightly() && !check_nightly_installed(){ return Some("Rust nightly not installed, please install it!") } @@ -39,6 +40,10 @@ pub fn check() -> Option<&'static str> { check_wasm_toolchain_installed() } +fn rustc_stable_forced_to_nightly() -> bool { + env::var("RUSTC_BOOTSTRAP") == Ok("1".to_string()) +} + fn check_nightly_installed() -> bool { let command = crate::get_nightly_cargo(); command.is_nightly() diff --git a/substrate/node/runtime/src/lib.rs b/substrate/node/runtime/src/lib.rs index fdf0bfdc14..ac801fd39e 100644 --- a/substrate/node/runtime/src/lib.rs +++ b/substrate/node/runtime/src/lib.rs @@ -84,8 +84,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to equal spec_version. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 178, - impl_version: 178, + spec_version: 179, + impl_version: 179, apis: RUNTIME_API_VERSIONS, };