Book Section:Minimal Rust KernelProblem: Even after setting up build-std in Cargo.toml rust build ignores build-std and produces an error. I did add rust-src and it was already installed.
Version: rustc 1.72.0-nightly (d59363ad0 2023-06-01)
cargo build --target x86_64-blog_os.json
results in the error:
Compiling blog_os v0.1.0 (/home/kgray/blog_os)
error[E0463]: can't find crate for core
Workaround:
We can specify which crates to compile with the -Z flag.
Oddly enough the compiler complains that the [unstable] manifest key is unused.
The instructions specified in the book are correct and consistent with the documentation. Thus this is really an issue with rust nightly. However, I wanted to document how I overcame this issue here. If I create a bug report for rust, I will link it here.
Book Section: Minimal Rust Kernel Problem: Even after setting up build-std in Cargo.toml rust build ignores build-std and produces an error. I did add rust-src and it was already installed. Version: rustc 1.72.0-nightly (d59363ad0 2023-06-01)
results in the error:
Workaround: We can specify which crates to compile with the -Z flag.
Oddly enough the compiler complains that the [unstable] manifest key is unused.
The instructions specified in the book are correct and consistent with the documentation. Thus this is really an issue with rust nightly. However, I wanted to document how I overcame this issue here. If I create a bug report for rust, I will link it here.