All Projects → nuta → kerla

nuta / kerla

Licence: other
A new operating system kernel with Linux binary compatibility written in Rust.

Programming Languages

rust
11053 projects
c
50402 projects - #5 most used programming language
assembly
5116 projects
Makefile
30231 projects
python
139335 projects - #7 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to kerla

KSOS
Our very own Operating System built from scratch for x86 architecture systems!
Stars: ✭ 83 (-97.3%)
Mutual labels:  operating-system, operating-system-kernel
LudOS
A toy monolithic kernel written in C++
Stars: ✭ 38 (-98.77%)
Mutual labels:  operating-system, operating-system-kernel
SimpleOS
Operating System Coded in Assembly and C
Stars: ✭ 72 (-97.66%)
Mutual labels:  operating-system, operating-system-kernel
zambesii
Non-unix, custom-API hybrid OS kernel written in C++ which can be thought of as an emulated microkernel. The native API is almost fully asynchronous and the kernel is aimed at high-scaling, high-throughput-requiring multiprocessor workloads, with working support for SMP and NUMA already implemented. Join the IRC channel, #zbz-dev on freenode!
Stars: ✭ 13 (-99.58%)
Mutual labels:  operating-system, operating-system-kernel
apex
Apex RTOS - A (somewhat) Linux compatible real time operating system
Stars: ✭ 15 (-99.51%)
Mutual labels:  operating-system, operating-system-kernel
MoonOS
MoonOS (just a kernel atm) is a micro kernel designed for the x86_64 and arm architecure.
Stars: ✭ 82 (-97.34%)
Mutual labels:  operating-system, operating-system-kernel
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 (-98.47%)
Mutual labels:  operating-system
SnowFlake
Technology is free, SnowFlakeOS
Stars: ✭ 38 (-98.77%)
Mutual labels:  operating-system
witos
A SM^2 (smart and small) OS for IoT.
Stars: ✭ 29 (-99.06%)
Mutual labels:  operating-system
tinyos
An UNIX-like toy operating system runs on x86 CPU
Stars: ✭ 47 (-98.47%)
Mutual labels:  operating-system
duckOS
Yet another hobby x86 UNIX-like operating system written in C and C++. Features a dynamically linked userspace, an in-house c standard library, and more! And yes, it runs DOOM.
Stars: ✭ 250 (-91.88%)
Mutual labels:  operating-system
wiser
🐎 Extremely minimal vmm for linux written in C. Hopefully someday will spin linux-vm for you.
Stars: ✭ 249 (-91.91%)
Mutual labels:  operating-system
etheryal-kernel
Open Source Rust kernel; Runs WASM and WASI as lightweight containers.
Stars: ✭ 32 (-98.96%)
Mutual labels:  operating-system-kernel
Macaron
A sweet hobby made operating system written in C++ for x86 CPUs with GUI
Stars: ✭ 34 (-98.9%)
Mutual labels:  operating-system
sanos
Sanos operating system kernel
Stars: ✭ 55 (-98.21%)
Mutual labels:  operating-system
mckernel
McKernel
Stars: ✭ 88 (-97.14%)
Mutual labels:  operating-system
TinyMIPS
The Project TinyMIPS is dedicated to enabling undergraduates to build a complete computer system from scratch.
Stars: ✭ 29 (-99.06%)
Mutual labels:  operating-system
xinu-avr
the Xinu OS for AVR atmega328p devices (e.g. Arduino)
Stars: ✭ 18 (-99.42%)
Mutual labels:  operating-system
Osmanthus
A developing operating system
Stars: ✭ 36 (-98.83%)
Mutual labels:  operating-system
yosild
Yosild is a single shell script that builds a full, minimal Linux distribution based on BusyBox.
Stars: ✭ 97 (-96.85%)
Mutual labels:  operating-system

Kerla

CI Discord Chat

screenshot

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

  • Implements *NIX process concepts: context switching, signals, fork(2), execve(2), wait4(2), etc.
  • Supports commonly used system calls like write(2), stat(2), mmap(2), pipe(2), poll(2), ...
  • No disk support for now: initramfs is mounted as the root file system.
  • Pseudo file systems: tmpfs and devfs.
  • smoltcp-based TCP/IP support.
  • Implements tty and pseudo terminal (pty).
  • Supports QEMU and Firecracker (with virtio-net device driver).
  • Supports x86_64.
  • Docker-based initramfs build system.

Check out my blog post for motivation and my thoughts on writing an OS kernel in Rust.

Demo: SSH into Kerla!

You can play with Kerla over ssh. Your login is not visible from others (except me): we automatically launch a dedicated microVM on Firecracker for each TCP connection.

If you found bugs or missing features, let me know on GitHub issues :)

Running a Docker Image (experimental)

You can run a Docker image as a root file system (not as a container!) on Kerla Kernel instead of our initramfs built from initramfs directory.

For example, to run nuta/helloworld image (Dockerfile), try the following command:

$ make IMAGE=nuta/helloworld run
...
[   0.029] syscall: execve(439398, 4393b8, 4393c8, 8, 2f2f2f2f2f2f2f2f, 8080808080808080)
[   0.030] syscall: arch_prctl(1002, 4055d8, 0, 20000, 0, ff)
[   0.031] syscall: set_tid_address(4057f0, 4055d8, 0, 20000, 0, ff)
[   0.033] syscall: ioctl(1, 5413, 9ffffeed0, 1, 405040, 9ffffeef7)

 _          _ _                            _     _ _
| |__   ___| | | ___   __      _____  _ __| | __| | |
| '_ \ / _ \ | |/ _ \  \ \ /\ / / _ \| '__| |/ _` | |
| | | |  __/ | | (_) |  \ V  V / (_) | |  | | (_| |_|
|_| |_|\___|_|_|\___/    \_/\_/ \___/|_|  |_|\__,_(_)

This feature is in a very early stage and I guess almost all images out there won't work because:

  • They tend to be too large to be embedded into the kernel image.
  • They might use unimplemented features (e.g. position-independent executables used in Alpine Linux).

Building and Running the OS

See Quickstart for instructions on building from source, running on emulators, etc.

Current Roadmap

Roadmap - Run a Node.js Web Application on Kerla on Firecracker on AWS

Compatibility

See here for the current status.

Contributing

Send me bug reports, feature requests, and patches on GitHub for example:

  • Implementing missing features: majority of existing Linux applications won't work due to the lack of features.
  • Writing documentation: I think Kerla could be good material to learn how an operating system kernel works.
  • Trying to experiment with Rust-y ideas: for example currently I'm interested in GhostCell.

License

See LICENSE.md.

Related Work

Emulating Linux ABI is not a novel work. Some UNIX-like kernels like FreeBSD and NetBSD already have their own Linux emulation layers. Windows has a well-known feature called Windows Subsystem for Linux (WSL) which enables running Linux binaries seamlessly. WSL 1 implements the feature by ABI emulation. WSL 2 runs the real Linux kernel using the hardware-accelerated virtualization (Hyper-V).

Aside from general-purpose operating systems, there're some attractive projects related to the Linux ABI emualtion. OSv is a unikernel which runs unmodified Linux binaries. rCore is a teaching operating system which implements the Linux ABI in Rust. Noah suggests an intriguing approach to run unmodified Linux binaries on macOS.

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].