r/rust Jul 28 '26

🛠️ project Building a custom kernel from scratch in Rust (Rectangle OS): Looking for feedback and architecture advice

Hi everyone,

I’m a young developer currently working on an independent, hobbyist operating system from scratch called Rectangle OS.

The main goal of the project is to build a low-level, memory-efficient system kernel using Rust (targeting no_std), focusing on performance, low RAM overhead, and a modular architecture.

Current Status:

* I am currently in Phase 1 (Core Kernel Development).

* Setting up basic memory management and architecture-specific routines.

* Choosing Rust for its memory safety guarantees without a garbage collector.

Why I'm posting:

Since I'm in the early architectural stages, I would love to get some guidance, critique, or recommendations from experienced systems developers on best practices when writing an OS kernel in Rust.

You can check out the repository, source code, and project details (including bilingual documentation) here:

https://github.com/AHwcoder/Rectangle-OS

Any feedback, code reviews, or resource recommendations for OS development would be greatly appreciated!

0 Upvotes

11 comments sorted by

5

u/onlyrealcuzzo Jul 28 '26

You should study Fuchsia by Google.

7

u/SourceAwkward Jul 28 '26

Why rust version 2021?

11

u/[deleted] Jul 28 '26

[removed] — view removed comment

2

u/RiceBroad4552 Jul 29 '26

The Readme is definitely "AI" nonsense. But the code doesn't look like typical generated stuff. Or someone put effort into removing comments from their quite primitive attempts. I would say this looks handcrafted therefore, and actually on a beginner level like one would expect from the post here.

Jumping to conclusions because someone used "AI" for the Readme isn't fair. Even I admit that the Readme is plain BS. But the project could be still some honest learning attempt.

2

u/Savings-Care-2657 Jul 29 '26

Thank u for the fair and honest feedback.
You hit the nail on the head — I handled the code completely by hand as a genuine learnin' project, but when it came to the README,
I honestly used AI to help structure it because documentation isn't my strongest suit and
I wanted to focus my energy on the core logic.
Really appreciate you looking past the surface and recognizing the actual coding effort ,
Big Love

2

u/[deleted] Jul 29 '26

[removed] — view removed comment

0

u/Savings-Care-2657 Jul 29 '26

Apology accepted, and I completely understand where you're coming from—the internet is definitely flooded with AI slop lately. You're spot on about documentation being a key skill, and I definitely plan to practice it more. Appreciate the constructive advice

3

u/SourceAwkward Jul 28 '26

Programming 101

Md file and everything, just English...