Skip to content

sunsided/os

Repository files navigation

Rusty OS

Docs Build Kernel Build UEFI Loader

A toy x86-64 operating system written in Rust, using UEFI to boot and load a kernel image.

A screenshot of the "OS" running

Table of Contents

Features

  • UEFI bootloader
  • Kernel image loading
  • Basic memory management
  • Basic I/O
  • Basic process management
  • Basic file system
  • Basic shell
  • Basic networking
  • Basic UEFI GOP framebuffer
  • Basic graphics
  • Basic audio

Building the Project

Quick Start

To build and run the project on QEMU, use:

just package && just run-qemu
# or
just package-release && just run-qemu

Rust targets

To build for UEFI and plain ELF you'll need the following:

rustup target add x86_64-unknown-uefi
rustup target add x86_64-unknown-none

Pitfalls for Compiling

The workspace targets require different target architectures, for example x86_64-unknown-uefi for the UEFI loader package. At this moment, cargo build cannot be configured for per-package targets, so using cargo build from the workspace root is bound to fail.

For the easiest build path, use just build instead of cargo build, or use any of the aliases defined in .cargo/config.toml (such as cargo uefi-dev).

Example Build Commands

just uefi
cargo uefi
just build

Or, manually:

cargo build --package uefi-loader --target x86_64-unknown-uefi

Related Projects

  • The ruefi project is the spiritual parent of this repo.

License

Licensed under the European Union Public Licence (EUPL), Version 1.2.

About

A toy x86_64 operating system written in Rust

Topics

Resources

Stars

Watchers

Forks