All Projects → kwast-os → kwast

kwast-os / kwast

Licence: MIT license
Rust operating system running WebAssembly as userspace in ring 0

Programming Languages

rust
11053 projects
assembly
5116 projects

Projects that are alternatives of or similar to kwast

MoonOS
MoonOS (just a kernel atm) is a micro kernel designed for the x86_64 and arm architecure.
Stars: ✭ 82 (-1.2%)
Mutual labels:  x86-64, osdev, operating-system, microkernel
saturn
A microkernel based operating system developed from scratch. This repository also includes all Saturn services and applications.
Stars: ✭ 21 (-74.7%)
Mutual labels:  x86-64, osdev, operating-system, microkernel
Dgos
Operating System
Stars: ✭ 90 (+8.43%)
Mutual labels:  x86-64, osdev, operating-system
Nebulet
A proof-of-concept microkernel that implements a WebAssembly "usermode" that runs in Ring 0.
Stars: ✭ 2,237 (+2595.18%)
Mutual labels:  osdev, operating-system, microkernel
Cuteos
A 64-bit SMP-safe kernel for the PC architecture.
Stars: ✭ 51 (-38.55%)
Mutual labels:  x86-64, osdev, operating-system
Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+5546.99%)
Mutual labels:  x86-64, osdev, operating-system
poplar
Microkernel and userspace written in Rust exploring modern ideas
Stars: ✭ 217 (+161.45%)
Mutual labels:  osdev, operating-system, microkernel
Dennix
Dennix is a unix-like hobbyist operating system written from scratch.
Stars: ✭ 53 (-36.14%)
Mutual labels:  x86-64, osdev, operating-system
munix
🦠 µnix is a UNIX-like operating system
Stars: ✭ 57 (-31.33%)
Mutual labels:  osdev, operating-system, microkernel
SynnixOS
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.
Stars: ✭ 40 (-51.81%)
Mutual labels:  x86-64, osdev, operating-system
biefircate
Running x86-16 or x86-32 code from x86-64 UEFI; _very experimental_ • mirror of https://gitlab.com/tkchia/biefircate • developer notes at https://gitlab.com/tkchia/biefircate/-/blob/main/doc/NOTES.asciidoc
Stars: ✭ 47 (-43.37%)
Mutual labels:  x86-64, osdev, operating-system
KnutOS
An x86_64 hobbyist OS written in C and Assembly
Stars: ✭ 16 (-80.72%)
Mutual labels:  x86-64, osdev, operating-system
Wingos
a little 64bit operating system written in c++ with smp support
Stars: ✭ 361 (+334.94%)
Mutual labels:  x86-64, osdev, operating-system
Cyjon
A simple, clean code, multi-tasking operating system written in pure assembly language for 64-bit processors from the AMD64 family.
Stars: ✭ 184 (+121.69%)
Mutual labels:  x86-64, osdev, operating-system
utero
The Operating System (for x86_64) written in Crystal as much as possible
Stars: ✭ 55 (-33.73%)
Mutual labels:  x86-64, osdev, operating-system
rust os
My hobby operating system microkernel written in Rust
Stars: ✭ 33 (-60.24%)
Mutual labels:  osdev, operating-system, microkernel
Managarm
Pragmatic microkernel-based OS with fully asynchronous I/O
Stars: ✭ 502 (+504.82%)
Mutual labels:  x86-64, operating-system
ByteOS
A simple hobby operating system for the x86-64 architecture, written in C.
Stars: ✭ 47 (-43.37%)
Mutual labels:  x86-64, operating-system
Beelzebub
The Lord of Flies - A hobby operating system
Stars: ✭ 24 (-71.08%)
Mutual labels:  x86-64, operating-system
Os2
x86_64 OS kernel with completely async userspace and single address space [WIP; but basic kernel functionality implemented]
Stars: ✭ 25 (-69.88%)
Mutual labels:  x86-64, osdev

Kwast

MIT licensed Build Status

Kwast (will be) an operating system, written in Rust, running WebAssembly. It uses a microkernel architecture for flexibility.

Since WebAssembly was designed to be a safe language, we can run it without having to use hardware usermode and multiple address spaces (optionally). Processes can be run in the same address space (multiple SIPs in a single hardware protection domain), or in seperate address spaces. This enables low-cost context switches, low-cost syscalls, and a microkernel design without a big performance hit. Another interesting thing is that it means the software is cross-platform and that the compiler could enable platform-specific optimisations.

For notes on Spectre, Meltdown and other related issues, see #10. An additional idea is to allow to use optional hardware protection domains in the future if requested.

Contents

Current status

Currently, it runs basic WebAssembly code in a basic multitasked environment. The heap uses a slab allocator design, and the virtual memory areas are managed by an AVL tree. For the ABI, I started with implementing WASI.

Here's a screenshot of a WASI compiled Rust program (userspace/wasm-test). Screenshot

Getting started

These instructions help you get started with building the source and getting it to run.

Requirements

  • make
  • grub-mkrescue (you might also need to install xorriso)
  • qemu-system-x86_64
  • Rust and Cargo
  • Optionally wasm-strip (from wabt), which reduces the binary size

Setting up a toolchain

You can setup your toolchain using the following steps:

# (Inside the project root folder.)
# You'll need to get the rust nightly and install the wasi toolchain:
rustup component add rust-src
rustup target add wasm32-wasi

# You'll also need a cross-compile binutils, I wrote a bash script that builds this for you.
cd toolchain
./setup_cross_binutils.sh

Now you're ready to build and run the project!

Building & Running

There's currently a Makefile in the kernel folder. The Makefile there provides some rules:

# (Inside the project root folder.)
make run # Builds iso and start a QEMU virtual machine

# If you don't want to run, but only build a bootable ISO:
make iso

# You can make a release build using:
make iso BUILD=release # (or run)

# You can run tests using
./run_tests

Short-term goals

  • Simple PS/2 server & similar small servers
  • Run basic programs
  • SMP

Built with

Similar projects

  • Nebulet - A microkernel that implements a WebAssembly "usermode" that runs in Ring 0
  • wasmjit - Small Embeddable WebAssembly Runtime
  • cervus - A WebAssembly subsystem for Linux
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].