Rux - An x86_64 toy operating system kernel written in Rust

Overview

The Rux Kernel

languages top-lang code-size license

Rux - An x86_64 toy operating system kernel written in Rust. Rux is a port of the Hux kernel, my x86 32-bit single-CPU toy kernel written in C, following the OSTEP book structure and terminology.

Author Kernel Src LoC (temp) Dev Doc LoC (temp)
Guanzhou Hu Rust + x86 ASM Markdown
Jan. 2022 ??? ???

Development Doc

I document the porting process from Hux to Rux, especially the unique challenges and design choices exposed by porting a legacy C kernel to a modern memory-safe programming language, in the WIKI pages 📝 of this GitHub repository ✭.

It is recommended to also take a look at the wiki pages of Hux to know about its basic design and structure.

If there are any typos / mistakes / errors, please raise an issue!

Playing with Rux

Requires a Linux host development environment. Tested on Ubuntu Focal.

Clone the repo, set up the Rust development toolchain following this wiki page, then build Rux by:

$ make [debug|release]  # defaults to debug

To run Rux in QEMU >= v6.2.0, install QEMU & GRUB following this wiki section, then do:

$ make qemu     # opens a VGA GUI window

If you are in a non-GUI environment, it is recommended to redirect VGA output to built-in VNC server, and connect to that server from a VNC client:

$ make qemu_vnc     # redirects VGA output to VNC server
                    # from VNC client, connect to 'hostname:5901'

You will see the QEMU GUI popping up with GRUB loaded. Choose the "Rux" option with Enter to boot into Rux.

For a taste of what a minimal C kernel looks like, please check out the wiki pages of Hux (recommended). I have every single detail documented there.

References

Main references:

OS conceptual materials:

Check the "References" section of Hux here for the full list. You will also need some understanding of and a passion for the Rust language, a great next-gen system programming language.

TODO List

  • Dev setup following Philipp's blog
  • Enter long mode in boot.s (w/ dummy paging)
  • Start the porting of Hux kernel
You might also like...
Let's write an OS which can run on x86_64 in Rust from scratch

rCore-Tutorial-v3 rCore-Tutorial version 3.5. See the Documentation in Chinese. news 2021.11.20: Now we are updating our labs. Please checkout chX-dev

🌃 Shade is an operating system written for the communication.

🌃 Shade Shade is an operating system written for the communication. 📃 Experiencing Building Requirements System: Windows, Linux or macOS. Memory: 1G

A hobby operating system written in Zig & C that reimagines classic UNIX ideas for modern technology

zorroOS is a hobby operating system written in Zig, currently targeting x86_64 PCs. Building Building zorroOS is simple. First, ensure that you have t

A hobby operating system, in Rust

intermezzOS: kernel intermezzOS is a hobby operating system. This repository is for its kernel. See the website for more. License This project is dual

A simples rust operating system that prints hello world.

rust-os-helloworld A simples rust operating system that prints hello world. Just run: cargo install bootimage and: cargo bootimage Install QEMU and: q

A Real Time Operating System in Rust for Cortex M3 embedded systems

A Real Time Operating System in Rust for Cortex M3 embedded systems

A secure embedded operating system for microcontrollers

Tock is an embedded operating system designed for running multiple concurrent, mutually distrustful applications on Cortex-M and RISC-V based embedded

A secure embedded operating system for microcontrollers

Tock is an embedded operating system designed for running multiple concurrent, mutually distrustful applications on Cortex-M and RISC-V based embedded

The Stupid Operating System

Stupid Operating System SOS is a simple, tiny toy OS implemented in Rust. I'm writing this mostly for fun, to learn more about OS design and kernel ha

Owner
Guanzhou Jose Hu
Guanzhou (Jose) Hu
Guanzhou Jose Hu
A lightweight microkernel/IPC based operating system built with Rust which is not a clone of any existing operating system

Noble Operating System Noble is a lightweight microkernel and IPC based operating system built with Rust which is not a clone of any existing operatin

Revolution Xenon 3 Jan 10, 2022
A new operating system kernel with Linux binary compatibility written in Rust.

Kerla Kerla is a monolithic operating system kernel from scratch in Rust which aims to be compatible with the Linux ABI, that is, runs Linux binaries

Seiya Nuta 3.1k Jan 1, 2023
Xrs is a POSIX-subset operating system kernel written in Rust.

XRS-OS ( ?? WIP) Xrs is a POSIX-subset operating system kernel written in Rust. Current project team members 0x5459 core developer (he/him) 0x5457 cor

null 7 Nov 16, 2022
💻 An x86_64 kernel in the works

BruhOS a basic x86_64 kernel in the works. cool stuff written in rust boots with any stivale2-compliant bootloader framebuffer bitmap font renderer pm

Safin Singh 9 Jun 8, 2021
The official kernel for Popcorn OS, and operating system designed for handheld devices.

About Popkern is the kernel for Popcorn OS, an operating system designed for handheld devices. As such, the kernel is (to be) optimised at all levels

Team Scena 3 Sep 19, 2021
Writing an OS in Rust, To Study Operating System and Computer System

Hun Os Writing an OS in Rust, To Study Operating System and Computer System Reference Os Written In Rust https://github.com/seonghun-dev/blog_os https

Jung Seonghun 2 Dec 15, 2022
Operating system written in Rust for NumWorks calculator (model n0110)

RustWorks An OS (eventually) for the Numworks calculator (model n0110). Setup First install Rust by following these instuctions then: rustup target ad

null 30 Nov 10, 2022
SteinsOS is an operating system written in Rust

SteinsOS is an operating system featuring non-preemptive kernel targeting on single-core armv8 architecture.

Sheng 84 Dec 15, 2022
An attempt at an operating system written in Rust

Rust Operating System An attempt at a simple operating system in Rust and a semester project for the Operating Systems course at CS@UCU. Documentation

Andriy Sultanov 10 Jan 15, 2022
A Rust Operating System, written from the ground up

ThornOS A Rust Operating System, written from the ground up Build Dependencies Bootimage TODO: Document build process in more detail Acknowledgements

Stuart Reid 1 Mar 31, 2022