My attempt at making a simple snake game at the kernel level
This has to be the worst code I have ever written, everything is unsafe and unreadable, but it works :)
- Make sure you have the nightly toolchain installed
rustup toolchain install nightly
- Make sure you have
xbuild
cargo install cargo-xbuild
- Make sure you have
rust-src
rustup component add rust-src
- Make sure you have
bootimage
cargo install bootimage
- Compile it
cargo bootimage --release
You can easily run it in the QEMU virtual machine with the command below or you can burn the resulting .bin
in target/x86_64-unknown-none/release/
.
qemu-system-x86_64 -drive format=raw,file=target/x86_64-unknown-none/release/bootimage-spaghetti-os.bin