rcore-os / rCore-Tutorial-v3

Let's write an OS which can run on RISC-V in Rust from scratch!
https://rcore-os.github.io/rCore-Tutorial-Book-v3/index.html
GNU General Public License v3.0
1.64k stars 468 forks source link

The asm! has been stable since 1.59.0 #84

Closed sigongzi closed 1 year ago

sigongzi commented 2 years ago

The rust-toolchain is set to be 1.57.0 nightly. So the unstable feature asm can be used and the macro asm! is bring to the crate scope

But after the feature became stable, the usage #![feature(asm)] can not bring the macro asm! to the crate scope. I used rust 1.63 nightly to complie the source code. It seems that the only way to refer the macro asm is core::arch::asm!

But if you keep the rust complier version in 1.57.0, the compilation of dependency riscv will fail due to unreference of #![feature(asm)]

kkocdko commented 2 years ago

Yeah, maintainers were refactoring code for new version of rust. See ch2-dev branch and others.

For some chapters, you still need to modify it manually.