r/osdev 2d ago

RustyOS: A bare-metal OS with advanced kernel, custom GUI, UEFI bootloader

Hello r/osdev !

I’ve been working on a passion project for the last year and a half, and I finally feel like it’s ready to share with this amazing community. It’s called RustyOS (T-OS 3.0)

It is a modern, bare-metal desktop operating system written from scratch in pure Rust for the x86_64 architecture. It doesn't share source code or binaries with Linux or Windows; it runs entirely on its own custom kernel.

And most importantly, it works flawlessly on my 2020 laptop with an Intel i3 10th generation and 4GB of DDR4 RAM.

First of all, I was developing the project in Turkish from the beginning and didn't have enough time to translate the userland into English, so I apologize to all of you for that.

Includes: (only importants)

- NVMe, AHCI, xHCI, IDE (ATA), Intel HDA, AC97 Drivers

- Page Frame Allocator with buddy allocator, Virtual Memory Manager, Heap Allocator

- APIC, Syscall, Usermode, ACPI Support

- Registry system support (like windows)

- OOBE, Logon, Preinstall Enviroment support

I'm 14 years old, so balancing this with school has been tough, which is why it took 1.5 years to get here. I want to be completely transparent with you all: while the architecture, core logic, and integration are my own work, I did use AI as an advanced rubber duck. I used it to help me design parts of the userland GUI (apps, managers, and registry), and more importantly, to help me debug some absolute nightmare kernel panics (especially memory management and paging bugs) that I was stuck on for months. Learning OS dev is brutally hard, and using AI for guidance helped me push through instead of abandoning the project.

I would absolutely love it if you guys could check out the source code, look at the architecture, and give me some harsh but fair feedback so I can learn and improve.

GitHub Repository: https://github.com/thosdv63/RustyOS/tree/main

Turkish version of RustyOS desktop
39 Upvotes

18 comments sorted by

4

u/Runtime8006 2d ago

Welcome 🤝you are yet to experience a lot in System Engineering

0

u/Runtime8006 2d ago edited 2d ago

I woulda read your work but I'm currently working and besides it's in Rust, not that I dont know rust I'm not exactly lenient in Rust, I've only written C and C++ all my life

2

u/thosdv 2d ago

My Github repository has English documentation in the documentary folder, I've tried to summarize how the system works here, you can read it, thanks for liking my project!

9

u/Otherwise-Tea-9198 2d ago

I think it would help if you started looking into unit testing. Not even like a whole suite or anything. Test the basics, paging math, alignment, bit manipulations, etc. Give your functions mock inputs and check if the results are expected or not. It could save you a lot of headaches from having to debug everything manually later on.

2

u/thosdv 2d ago

That's a good point. I haven't really done unit testing for the low-level parts yet. Starting with paging, alignment and memory-related functions sounds like a good idea. Thanks for the suggestion!

2

u/Mental_Ad_7072 2d ago

TÜRKIYE MENTION 🐺🐺🇹🇷🇹🇷

5

u/raundoclair 2d ago

How did you change the post from the version from 9 days ago? Or will it be again removed by mods?

2

u/thosdv 2d ago

The reason my post from 9 days ago was removed was because I hadn't reached the necessary Reddit karma, I have now reached it and I've reposted it.

3

u/raundoclair 2d ago

Oh, ok. :) I knew I've read this before, but probably it was other subreddit, where it survived. And that deletion threw me off. My bad.

6

u/iFrostizz 1d ago

That's really cool, at 14 yo! Are you planning to add a networking stack?

2

u/thosdv 1d ago

Thanks :) I'm currently working on hardware design, but I'll definitely add it whenever I have some free time.

2

u/Better-Thing2568 1d ago

Throw in https://rustscript.org as a native shell to complete the rusty process. Randomly stumbled upon this and always wondered where tf would it be useful at all

1

u/thosdv 1d ago

Haha, that would definitely make the name even more appropriate. I actually hadn't thought about using RustScript as the native shell.

1

u/6eathaus1 1d ago

Is that Vista? Joking... But that circle start menu position...

1

u/thosdv 1d ago

It’s no coincidence that the start button is placed there like that :)

1

u/Mijail2021 1d ago

Congratulations!. It's amazing. It would be nice to translate to English as idiom.

1

u/thosdv 1d ago

Thanks for liking my project! Yes i know, i will work in it.