Simple OS
To compile for bare metal, you need the Rust source code and the LLVM tools for cross-compilation.
rustup component add rust-src
rustup component add llvm-tools-preview
Install the bootimage tool to handle the creation of a bootable disk image from your compiled kernel.
cargo install bootimage
Compile the kernel and link it with the bootloader to generate a bootable .bin image.
cargo bootimage
To run the OS use the following command:
qemu-system-x86_64 -drive format=raw,file=target/os/debug/bootimage-OS.bin -serial stdio -netdev user,id=net0 -device e1000,netdev=net0