A Rust implementation of the Operating System in 1000 Lines.
We assume you're working on a UNIX-like operating system.
To develop, build and run you need to install rustup and QEMU.
Next, you need to install some additional components:
rustup target add riscv32i-unknown-none-elf
rustup component add llvm-tools
cargo install cargo-binutilsYou can use all the usual Cargo commands to develop.
In particular, you can use cargo run to build and run the OS with QEMU.
Also, you can use the various binutils tools to debug and inspect the generated machine code:
cargo objdump -- -D
cargo nm
cargo readobj -- -S