An open-source reimplementation of the Horizon microkernel used in the Nintendo Switch.

Related tags

Emulators Saturnus
Overview

Saturnus

An open-source reimplementation of the modern RTOS microkernel "HorizonKernel" that is used in the Nintendo Switch.

About

The original Horizon kernel is written in modern C++ using a design heavily based on reference-counted C++ objects. As a microkernel, it has a custom IPC system and being a custom design, it has zero POSIX compatibility elements.

A combination of these factors makes up for a very interesting research project to see how well the Rust language can handle the design of this kernel in its essence, while also providing semantic equivalence to the original kernel.

That being said, the goal is not to generate matching binaries to the original but to have an idiomatic open source reference of this masterpiece while pushing Rust's boundaries and exploring the capabilities of this language in the process. Maybe we will also extinguish Linux from the world of embedded software for good as a side effect.

Code Organisation

TODO: Write me.

Building and Testing

Dependencies and cargo-xtask

Saturnus uses cargo-xtask as it's build system which can be invoked by running cargo xtask in the project directory. Execute cargo xtask help to see all possible commands xtask can execute.

This has the advantage that the only dependency required to build Saturnus is Rust itself and all the components of the Rust toolchain specified in the rust-toolchain.toml file. These will automatically be installed by rustup if you enter the project directory.

Building and Running

To build and run the Saturnus Kernel in QEMU execute the following command

cargo kernel run --release

cargo kernel is an alias for cargo xtask -p kernel (see .cargo/config.toml for all aliases) and thus can be used to execute each action provided by xtask:

# Only build the kernel in debug mode
cargo kernel build

# Run one of the LLVM bintools on the produced kernel binary
cargo kernel llvm size

Since Saturnus is composed of multiple packages, all these commands also work for other packages (e.g. the loader: cargo loader build / cargo xtask -p loader build).

For a complete and up-to-date overview run cargo xtask help.

Testing

TODO: Write once we have proper tests

Contributing

Because of the official status as a research project and the required familiarity with the original system, this project is unlikely to accept significant code contributions from people that are not project developers without prior bikeshedding discussion.

Code quality improvements, additional documentation and bugfixes to the existing codebase are encouraged and heavily appreciated anytime!

License

Saturnus notably consists of the Kernel itself and its corresponding bootstrap loader, which can be found under kernel/, and its library ecosystem under crates/.

The kernel and its loader are licensed under the terms of the GNU General Public License v2. See LICENSE-GPL for more details.

The library ecosystem, on the other hand, is designed to be re-usable in the world of embedded Cortex-A, and is therefore dual-licensed under the terms of either the Apache License (Version 2.0) or the MIT license, at the user's choice. See LICENSE-APACHE and LICENSE-MIT for details.

Contributions to a specific component of the Saturnus project must be made under the terms of all licenses it is governed by.

You might also like...
A lightweight microkernel/IPC based operating system built with Rust which is not a clone of any existing operating system
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

Kusion Configuration Language (KCL) is an open source configuration language mainly used in Kusion Stack

Kusion Configuration Language (KCL) is an open source configuration language mainly used in Kusion Stack. KCL is a statically typed language for configuration and policy scenarios, based on concepts such as declarative and Object-Oriented Programming (OOP) paradigms.

An open-source emulator for small OLED displays that are often used for Arduino/IOT projects.
An open-source emulator for small OLED displays that are often used for Arduino/IOT projects.

SSD1306 OLED Emulator An open-source emulator for small OLED displays that are often used for Arduino/IOT projects. This project is still in an alpha

RustBoyAdvance-NG is a Nintendo™ Game Boy Advance emulator and debugger, written in the rust programming language.
RustBoyAdvance-NG is a Nintendo™ Game Boy Advance emulator and debugger, written in the rust programming language.

RustBoyAdvance-NG Nintendo GameBoy Advance ™ emulator and debugger, written in rust. WebAssembly Demo: https://michelhe.github.io/rustboyadvance-ng/ P

Playboy is a Nintendo Gameboy emulator for the Panic Playdate written in Rust
Playboy is a Nintendo Gameboy emulator for the Panic Playdate written in Rust

Playboy Playboy is a Nintendo Gameboy emulator for the Panic Playdate! Building Playdate isn't exactly a Tier 1 platform for Rust :) As a result, the

Initial project for using Rust on the Nintendo 64.

N64 Project Template for Rust This repo is intended to be a starting point for developing software for the Nintendo 64 console using Rust. Only the ba

ANISE provides an open-source and open-governed library and algorithmic specification for most computations for astrodynamics

ANISE provides an open-source and open-governed library and algorithmic specification for most computations for astrodynamics. It is heavily inspired by NAIF SPICE, and may be considered as an open-source modern rewrite of SPICE.

Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin.

OPI - Open Protocol Indexer Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin. OPI uses a fork

A reimplementation of the excellent word game Wordle by Josh Wardle.

Paudle A reimplementation of the excellent word game Wordle by Josh Wardle. This version was created using Yew and Rust. I cribbed the colors and layo

A reimplementation of the Zopfli compression tool in Rust.

Zopfli in Rust This is a reimplementation of the Zopfli compression tool in Rust. Carol Nichols started the Rust implementation as an experiment in in

A pure Rust reimplementation of libc functions localtime, gmtime and mktime.

tz-rs A pure Rust reimplementation of libc functions localtime, gmtime and mktime. This crate allows to convert between a Unix timestamp and a calenda

First Git on Rust is reimplementation with rust in order to learn about rust, c and git.

First Git on Rust First Git on Rust is reimplementation with rust in order to learn about rust, c and git. Reference project This project refer to the

Reimplementation of Matthias Müller's "Ten Minute Physics" demos in Rust with WASM + WebGL

ten-minute-physics-rs reimplements Matthias Müller's "Ten Minute Physics" demos in Rust with WASM + WebGL. Compared with the source pure Javascript im

⚡ An extremely fast reimplementation of gmad.exe and gmpublish.exe

⚡ fastgmad Download An extremely fast reimplementation of gmad.exe and gmpublish.exe. Prefer to use a GUI? Check out gmpublisher! Features Up to x100

A reimplementation of the minecraft server framework in rust.

FerrumC About FerrumC is a Rust-based reimplementation of the Minecraft server, designed to be fast and efficient, optimized for low memory usage and

A partial reimplementation of pre-commit in Rust

preco A partial reimplementation of pre-commit in Rust. Important Heavily just a proof-of-concept and work-in-progress. There are bits that could prob

Easy switch between AWS Profiles and Regions
Easy switch between AWS Profiles and Regions

AWSP - CLI To Manage your AWS Profiles! AWSP provides an interactive terminal to interact with your AWS Profiles. The aim of this project is to make i

A tool that switch default audio playback device on windows.

AudioSwitch A tool built by Rust that can switch default audio playback device on windows. How to use specify which device you want to use Execute it

🧠 A command-line utility for switching git branches more easily. Switch branches interactively or use a fuzzy search to find that long-forgotten branch name.
🧠 A command-line utility for switching git branches more easily. Switch branches interactively or use a fuzzy search to find that long-forgotten branch name.

git-smart-checkout A git command extension for switching git branches more efficiently. About Interactively switch branches or fuzzy search for that f

Owner
Valentin B.
Student, programmer, InfoSec engineer, and occasional writer. Passionate about the low-level.
Valentin B.
An open-source emulator for small OLED displays that are often used for Arduino/IOT projects.

SSD1306 OLED Emulator An open-source emulator for small OLED displays that are often used for Arduino/IOT projects. This project is still in an alpha

Sam Peach 21 Oct 23, 2022
RustBoyAdvance-NG is a Nintendo™ Game Boy Advance emulator and debugger, written in the rust programming language.

RustBoyAdvance-NG Nintendo GameBoy Advance ™ emulator and debugger, written in rust. WebAssembly Demo: https://michelhe.github.io/rustboyadvance-ng/ P

MishMish 510 Dec 30, 2022
Experimental Nintendo Switch Emulator written in Rust

Kaminari Experimental Nintendo Switch Emulator written in Rust Usage You'll need to install Rust. rusc >= 1.55.0 rustup >= 1.24.3 Disclaimer Kaminari

SSebigo 4 Dec 7, 2021
Work-in-progress Nintendo Switch emulator, written in Rust and slightly less focused on gaming

pegasus Work-in-progress Nintendo Switch emulator, written in pure Rust and slightly less focused on gaming Information This project aims to be a diff

XorTroll 21 Nov 22, 2022
4fun open-source Cave Story reimplementation written in Rust

doukutsu-rs Download latest Nightly builds (Requires being logged in to GitHub) A re-implementation of Cave Story (Doukutsu Monogatari) engine written

null 564 Jan 1, 2023
Free and open-source reimplementation of Native Mouse Lock (display_mouse_lock) in rust.

dml-rs display_mouse_lock in rust. Free, open-source reimplementation of display_mouse_lock (Native Mouse Lock) in Rust. Written because I felt like i

Tomat 4 Feb 12, 2023
DNS resolver for split-horizon scenarios

polyresolver is a resolver for split-horizon scenarios polyresolver is used to root domain names to different nameservers for the purposes of resolvin

Erik Hollensbe 7 Aug 23, 2022
H2O Open Source Kubernetes operator and a command-line tool to ease deployment (and undeployment) of H2O open-source machine learning platform H2O-3 to Kubernetes.

H2O Kubernetes Repository with official tools to aid the deployment of H2O Machine Learning platform to Kubernetes. There are two essential tools to b

H2O.ai 16 Nov 12, 2022
Elemental System Designs is an open source project to document system architecture design of popular apps and open source projects that we want to study

Elemental System Designs is an open source project to document system architecture design of popular apps and open source projects that we want to study

Jason Shin 9 Apr 10, 2022
(Going to be) A microkernel that implements a WebAssembly "usermode" that runs in Ring 0.

Read this (from the creator of Nebulet) Hi everyone, It's been a while since I've looked at this repository. Nebulet is not in active development, and

Nebulet 2.3k Dec 15, 2022