Writing Operating System In Rust!
"If you can't explain it simply, you don't understand it well enough." — Albert Einstein
Hello there!1
This is a book on how to write a functioning operating system in rust, from scratch.
I will not use ANY2 external libraries, and all of the thought process, code and implementations will be explained and documented here as well as in this repo which will contain all of the implementation!
Base Knowledge
This book will be technical, and will assume a little bit of a programming knowledge background, but not necessarily in rust
If you are not coming from a low level programming knowledge that's fine!
Just make sure you know this stuff, and probably similar stuff that I am forgetting. Also if in any place on this book I take some things for granted, please, open an issue here and let me know so I could explain it better.
The base things that I expect you to know are:
-
Some assembly knowledge. (just understand simple movs, and arithmetic operations, at a very basic level3)
-
Some knowledge on memory. (what's a pointer, what's an address)
-
A knowledge in rust is not that important, but knowing at least one programming language is Important. I myself have some more learning to do on Rust, and in this book I will also explain some great features that it have!
-
A lot of motivation to learn and understand. Although this is a complex subject, in this book I break it down into simple blocks of knowledge that are logical and easier to understand.
Chapters Of This Book
-
Compiling a stand alone binary
-
Boot loading, Debugging, stages and some legacy stuff
-
Important cpu modes and instructions
-
Paging, writing out own malloc
-
Utilizing the Interrupt Descriptor Table
-
File systems and Disk Drivers
-
Thinking in terms of processes
-
Writing a shell
-
Running our first program!
-
To be continued (Hopefully virtualization section and loading a vm of other OS)