Skip to content

Files

Latest commit

43163d3 · Jul 14, 2022

History

History
13 lines (9 loc) · 828 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 828 Bytes

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?

  1. I use it as a project to practice Rust. I got the opportunity to experiment with a wide variety of APIs in an OS.
  2. It allows me to compare Rust to C so I get concrete information on which one is better for a particular situation.
  3. 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:

  1. intro/threads.rs: You need unsafe to demonstrate the synchronization problem. The safe Rust actually prevents such problem.
  2. cpu-api.rs: We use libc to demonstrated fork().