Skip to content

Conversation

@mchalupiak
Copy link
Collaborator

Patch our rust stdlib to initialize the environment

])
.stdoe(cu::lv::W)
.stdin(cu::pio::write(PATCH_FILE))
.spawn()?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just do .wait_nz()? instead of .spawn()?.wait()?. _nz means wait for non-zero exit status (will error if command fails)

cu::bail!("failed to checkout the blessed commit.");
}

match patch_rust_std(&rust_path) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cu::check!(patch_rust_std(&rust_path), "failed to apply rust std patches")?;

Install {
/// Keep the rustc/llvm build output. This may consume a lot of disk space,
/// but makes it faster when debugging the toolchain
///
Copy link
Collaborator

@Pistonight Pistonight Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove extra line

/// The "blessed" commit hash to use (i.e. tested and will work)
static RUST_COMMIT: &str = "caadc8df3519f1c92ef59ea816eb628345d9f52a";
// This is a patch for the rust stdlib
// static PATCH_FILE: &'static str = "../../../../patches/rust_std.patch";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove the commented out lint

// Copyright (c) 2025 Megaton contributors

use std::path::{Path, PathBuf};
use std::{io::stdout, path::{Path, PathBuf}};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused?

// Copyright (c) 2025 Megaton contributors

// // This modules handles compiling c/c++/asm/rust code
// This modules handles compiling c/c++/asm/rust code
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: don't have to fix right now, but module comments start with //!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants