Skip to content
/ rust-os Public

Repository loosely following the "Writing an Operating System in Rust" blog by Philipp Oppermann.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

c1m50c/rust-os

Repository files navigation

rust-os

Verify

Repository following the "Writing an Operating System in Rust" blog by Philipp Oppermann.

Installing Requirements

Compilation Tools

This operating system is written in Rust so you'll need to install the language's compilation tools by running the following commmands:

Windows

$ choco install rust

MacOS

$ brew install rust

Nightly Channel

Alongside the normal compilation toolkit you'll need to add the nightly channel to your rustup installation, you can do so by running the following commands:

$ rustup update
> ...

$ rustup toolchain install nightly
> ...

# Also add the `x86_64-unknown-none` build target for compiling our kernel.
$ rustup target add x86_64-unknown-none

QEMU

Lastly, you'll need to install QEMU to emulate our operating system. To do so, follow the installation instructions for the platform you're currently using.

Running

After you've installed all of the requirements, running the operating system should be as simple as executing any of the following commands:

$ cargo run --release -- help
> ... # Help menu will pop up displaying a valid list of commands

$ cargo run --release -- uefi
> ... # QEMU Window should pop up launching our kernel's UEFI image

$ cargo run --release -- bios
> ... # QEMU Window should pop up launching our kernel's BIOS image

Testing

Due to the way this currently setup, testing is a bit funky. You can run the following commands to launch the kernel in test mode:

# This can be set to any value, as long as its present the kernel will be compiled in test mode.
$ export KERNEL_TEST_MODE="true"

$ cargo run --release -F testing -- <uefi||bios>
> ...

About

Repository loosely following the "Writing an Operating System in Rust" blog by Philipp Oppermann.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages