Home

Awesome

RustOS

A simple, language-based OS.

Current features:

Building:

  1. Dependencies:
  1. Pull this repo git clone https://github.com/ryanra/RustOS.git
  2. Make sure to pull the submodules as well: git submodule update --init
  3. Run:

Organization:

  1. Main kernel code now in a fork of rust's libstd
  2. There is a libstd symlink to the bulk of the code (links to rust submodule at lib/rust/src/libstd/)
  3. Almost RustOS rust code is in src/libstd/sys/rustos/ which is a link to lib/rust/src/libstd/sys/rustos/

Design goals:

  1. Implement the entire Rust standard library on bare metal. Essentially, you should be able to write your program, link against std, add a bootloader, and run on bare metal. Of course, we'll need a little more to make the operating system extensible (specifically, an interface for adding drivers and libraries)

  2. The OS will be as simple as possible with as little as possible in it. Specifically, Rust type safety allows us to omit:

  1. Micro/Monolithic kernel is really irrelevant because everything is running in kernel mode and safety is enforced by the language, so there's no need for user mode. That said, the goal is to keep this code base small and enforce least-privledge with tight modules that also allow future additions.

  2. Security. That's the big advantage that Rust would bring to an OS (i.e., memory safety) and that current OSes are really lacking.

Short-term goals:

  1. Handle interrupts, specifically get the keyboard working. done!
  2. Threading/Multiprocessing
  1. Other architectures:

Longer-term goals:

  1. Basic drivers
  1. A filesystem
  2. Network stack
  3. Port rustc to RustOS
  4. That's probably it!

Current issues:

  1. Linkage probelms fixed!
  2. Threading is buggy and needs more attention and more features.
  3. The current allocator never actually frees data and is just there to get collections working.

License

Apache License, Version 2.0 or the MIT license, at your option. See LICENSE-APACHE and LICENSE-MIT for details.