Tarnished is an experimental minimal operating system kernel written in Rust. It is built to produce a bootable GRUB (Multiboot) ISO that contains an ELF kernel and a static Rust library (libkfs.a). The Rust code is compiled without the standard library (no_std, no_main) and targets 32-bit x86 (i386).
-
GRUB bootable ISO: the Makefile builds a bootable ISO via GRUB, embedding the ELF kernel and the static Rust library.
-
Modular architecture: the project is organized into major modules
archcontains low-level x86 code (GDT, interrupts)drivershandles basic devices (VGA text output, PS/2 keyboard)subsystemsimplements the console and a small shell (tiny one...)syncprovides a spinlock-based synchronization layer
-
Interactive console + shell: VGA text-mode output (via a
printk!macro) with an ASCII banner at boot. PS/2 keyboard input is handled through interrupts. A minimal built-in shell supports simple commands likeclear,echo,color,reboot, etc. -
Interrupts and exception handling: PIC/IDT setup and IRQ enabling for keyboard support. The panic handler disables interrupts and prints a stack dump on failure.
-
Thread-safe output: the VGA console uses a spinlock to ensure atomic writes. All output goes through a centralized
printk!path. -
[INCOMING] MEMORY MANAGEMENT...
- Rust nightly (+
rust-src) - Low-level tooling:
ld.lld,nasm,grub-mkrescue,xorriso,mtools - Emulator:
qemu-system-i386(or equivalent QEMU x86 package) - Container:
docker
make docker
make qemu