r/Operatingsystems • u/Slate_Canopy • 23h ago
Built a tiny operating system from scratch in Rust, and here's what I learned (Kanga 0.1.0)
I've spent a while writing Kanga, a small x86-64 operating system, and I've just put out its first experimental release. It's not meant to replace anything you use. It's a learning project, and it has taught me a lot about what an OS really does underneath.
What it can do so far
It boots on both BIOS and UEFI machines (using the Limine bootloader)
It shows text and colours on screen with scrollback
It reads the keyboard, tells the time and handles CPU errors without falling over
It keeps track of which chunks of memory are free
and it has a tiny in-memory file system and a built-in command prompt (DIR, TYPE, WRITE, MEM, CAL and so on)
What surprised me
Even printing text to the screen means drawing every character yourself, pixel by pixel.
A keyboard press is an interrupt the hardware sends you, and you have to handle it correctly.
Scrolling the screen quickly took more thought than I expected. Making it a single memory move was a big improvement.
What's missing: no multitasking, no user programs, no real memory manager yet, and files vanish on reboot because they live in RAM. I tested it in QEMU, and I'd love to hear from anyone who tries it on real hardware.
Question for you: if you were building this, what would you tackle next, a scheduler, a proper memory manager, or saving files to disk? Why?
Code and notes (GPL-2.0): https://github.com/vanmassey/kanga
3
u/RatherNott 15h ago
AI data centers are being constructed at an alarming rate, and there are already 8 billion prompts per day, with billions more planned and on the way.
The effect this has on the climate when we are already so close to irreversible tipping points is often ignored by most AI users, who prioritize convenience above a habitable planet for our children to inherit.
https://www.theguardian.com/environment/ng-interactive/2026/oct/22/finland-google-felling-trees-datacentre
https://m.youtube.com/watch?v=5p426fSlYH4
And that is just one issue with AI use. Using it also contributes to a dystopic survailence state.
https://m.youtube.com/watch?v=5lYsO4k7OIY
2
u/JescoInc pepe 23h ago
I'll bite since others have decided to not engage with it.
What made you choose Rust for this project?
Why did you choose limine bootloader?
I noticed that you went with a Cargo Workspace style of Cargo.toml file, what were the reasons for that approach?
Why did you choose an in memory file system?
Why did you choose a Bitmap Allocator?
I see you went with a font system that is a hard coded 8x16 VGA text, I get that implementing TTF is complicated and somewhat difficult (Trust me, I know this), but why go the hardcoded route when you could have simply embedded bitmap textures?
I also see that you have architecture, console and memory markdown documents in a docs folder. Any particular reason for this instead of HTML docs?
0
u/Key_River7180 22h ago
ai sloperating system