Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Learnix Operating System

"If you can't explain it simply, you don't understand it well enough." - Albert Einstein


Imagine you need to write some code to read from a file. You write a single, elegant line of Python with open("my_file.txt") as f: and the file opens and the content appears as if by magic.

To the vast majority of the developers (more than 60%!) who rely on high-level languages like Python and JavaScript1, writing code looks like this. We are all surrounded by abstractions, and forgot to learn the underlying implementation. We trust our operating system to handle the context switching, the virtual memory mapping, and the I/O operations, often treating the kernel as an infallible, black-box rather than a piece of software we can actually understand.

I followed the common path, starting with Python before moving to C to get a better understanding of how memory and hardware work. I expected C to reveal the inner workings of the system, but I quickly found that calling open("my_file.txt", "r"); in C is functionally very similar to calling it in Python, both are simply wrappers for an existing system call. Instead of interacting with the hardware, I was still just asking an existing kernel to do the work for me. When I did try to move past these abstractions to write more "bare metal" code, I met the standard frustrations of low level development, which include segmentation faults, data corruptions, and thread safety violations that are really annoying and difficult to debug.

But what if we didn't have to choose between the safety of a high level language and the power that a lower level language gives us? Where the compiler doesn't just catch our syntax errors, but guarantees that code that should not work, will not even compile. This includes data races or null pointer dereferences before we even hit "run". This is the shift offered by Rust, and this is why it is the language of choice in our operating system.

Today, the "inner workings" of the operating system have become a blind spot. This lack of low level knowledge leads directly to critical security vulnerabilities. Furthermore, many developers are trapped using languages like C and C++ that, while powerful, are fundamentally flawed in their design, requiring humans to manually manage memory with a level of perfection that is statistically impossible to achieve.

This problem has reached a breaking point in the "AI copy paste" or "Vibe coding" culture. Developers increasingly rely on Large Language Models to generate code that they do not fully read or understand. Even in high level languages, this results in "bloatware"2, poor performance, and legacy systems that are impossible to debug because no one on the team knows how the underlying resources are actually being managed.

My proposed solution is to return to the core of computing and untangle the black box. By building an operating system from scratch in Rust, we will learn to bridge the gap between high level logic and bare metal reality. The solution isn't just to "learn a new language", but to adopt a new philosophy. Through this book, we will gain two primary benefits:

  1. Operating system understanding: We will move past the wrappers and system calls to implement our own memory allocators, paging structures, file systems, and more kernel logic.

  2. Modern Safety Standards: We will learn how Rust's ownership model and rich type system can eliminate entire classes of bugs that are common in C / C++ codebases.

We no longer have the luxury of ignoring the "small stuff". As the industry moves toward more complex distributed systems and edge computing, the "black box" that was once small, had grown so large that we can't ignore it. Even large organizations such as the U.S. Cybersecurity and Infrastructure Security Agency (CISA)3 and the White House4 issued a formal report specifically urging developers to transition to "memory-safe languages" like Rust to eliminate security vulnerabilities that stem from memory unsafety.

How to read this book & Target audience

Throughout this book, we will explore a wide range of Operating System specific concepts and Rust patterns. Even if this sounds hard, I encourage you to dive in, even if you have no prior experience with low level programming! To help you navigate these complex topics, I will provide clear, approachable explanations, with highly visual elements such as animations, diagrams and colorful code blocks.

For topics that fall outside the immediate scope of this project, I will provide links with learning material to bridge the gap. That said, as developers, I also expect you to leverage your googling ability when you encounter a challenge :)

There are two types of chapters:

  1. Chapters that will contain OS topics will be tagged with the OS tag.
  2. Chapters that will contain Rust topics will be tagged with the RUST tag.

As a last note, I hope you will invest your precious time in reading this book, because I assure you it would make you a better, well rounded developer.


  1. stackoverflow 2025 annual survey

  2. Software that includes many parts that are not needed and unwanted.

  3. CISA Report

  4. White House Report