[package] name = "rust_kernel" version = "0.1.0" edition = "2024" [dependencies] # Bootloader 0.9.x: the version used by the 2nd edition of "Writing an OS in Rust". # `cargo bootimage` links it with our kernel into a bootable BIOS disk image. bootloader = "0.9" volatile = "0.2.6" # stops the compiler optimising away VGA buffer writes spin = "0.5.2" # spinlock Mutex (no OS = no std::sync::Mutex) x86_64 = "0.15" # safe wrappers for x86 instructions/ports (hlt, outb, ...) uart_16550 = "0.3" # driver for the serial port (COM1) [dependencies.lazy_static] version = "1.0" features = ["spin_no_std"] [features] # Build with `--features headless` to make the kernel shut QEMU down after # printing its greeting (used by scripts/run-headless.sh). Without it the # kernel just halts forever so you can look at the QEMU window. headless = [] # No unwinding in a kernel: just abort on panic. [profile.dev] panic = "abort" [profile.release] panic = "abort" # Extra QEMU arguments used by `cargo run` (via `bootimage runner`). [package.metadata.bootimage] run-args = [ "-device", "isa-debug-exit,iobase=0xf4,iosize=0x04", # lets the kernel exit QEMU "-serial", "stdio", # serial port -> your terminal ]