This is a WIP implementation of C code from Operating Systems: Three Easy Pieces in Rust.
Why do I want to port them to Rust?
- I use it as a project to practice Rust. I got the opportunity to experiment with a wide variety of APIs in an OS.
- It allows me to compare Rust to C so I get concrete information on which one is better for a particular situation.
- This is a precursor for an experiment to write yet anther OS in Rust.
Whenever we have a choice between unsafe libc
or safe Rust std
, we always go with the safe one as that is what make
Rust better. A few exceptions are:
- intro/threads.rs: You need unsafe to demonstrate the synchronization problem. The safe Rust actually prevents such problem.
- cpu-api.rs: We use
libc
to demonstratedfork()
.