phil-opp / blog_os

Writing an OS in Rust
http://os.phil-opp.com
Apache License 2.0
14.27k stars 1.01k forks source link

cargo build --target x86_64-blog_os.json error[E0463]: can't find crate for `core` #1302

Closed shashank-jain45 closed 4 months ago

shashank-jain45 commented 4 months ago

If your issue persists even after installing rust-src and setting up [unstable]

Refer to this - https://os.phil-opp.com/cross-compile-libcore/#:~:text=If%20you%20get%20an%20error,t%20find%20the%20core%20library.

TLDR; cargo install xargo xargo build --target x86_64-blog_os

It would be nice to add link to this blog in post-2

phil-opp commented 4 months ago

Could you try cargo build -Z build-std=core --target x86_64-blog_os? If that works, there is probably an issue with the setup of the [unstable] table.

shashank-jain45 commented 4 months ago

Yupp worked, there was an issue with my cargo.toml ! Thanks