mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Support stable rust for compiling the runtime (#13580)
* Support stable rust for compiling the runtime This pull request brings support for compiling the runtime with stable Rust. This requires at least rust 1.68.0 to work on stable. The code is written in a way that it is backwards compatible and should automatically work when someone compiles with 1.68.0+ stable. * We always support nightlies! * 🤦 * Sort by version * Review feedback * Review feedback * Fix version parsing * Apply suggestions from code review Co-authored-by: Koute <koute@users.noreply.github.com> --------- Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
@@ -35,10 +35,13 @@ fn print_error_message(message: &str) -> String {
|
||||
///
|
||||
/// Returns the versioned cargo command on success.
|
||||
pub(crate) fn check() -> Result<CargoCommandVersioned, String> {
|
||||
let cargo_command = crate::get_nightly_cargo();
|
||||
let cargo_command = crate::get_cargo_command();
|
||||
|
||||
if !cargo_command.is_nightly() {
|
||||
return Err(print_error_message("Rust nightly not installed, please install it!"))
|
||||
if !cargo_command.supports_substrate_wasm_env() {
|
||||
return Err(print_error_message(
|
||||
"Cannot compile the WASM runtime: no compatible Rust compiler found!\n\
|
||||
Install at least Rust 1.68.0 or a recent nightly version.",
|
||||
))
|
||||
}
|
||||
|
||||
check_wasm_toolchain_installed(cargo_command)
|
||||
|
||||
Reference in New Issue
Block a user