Skip to content

Sinio-Manoka/kio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kio

Kio is a Rust hobby kernel targeting a Linux-class operating system architecture over time, starting from a custom x86_64 kernel running under Limine and QEMU.

The current codebase already includes real kernel bring-up, memory management, interrupts, a basic scheduler, ring 3 execution, a small syscall layer, ELF loading for bundled user programs, and a minimal interactive userspace shell.

Project Goals

This project is not a toy boot demo. The long-term direction is:

  • a Rust kernel with real process and memory isolation
  • a growing POSIX-style syscall surface
  • filesystem and file descriptor infrastructure
  • pipes, terminals, and job control
  • enough userspace compatibility to eventually run a real external shell

Today, the repository is still in the early kernel-and-userspace foundation stage, with x86_64 as the primary supported target.

Current Capabilities

  • boots through Limine into a Rust no_std kernel
  • serial logging and panic reporting
  • GDT, IDT, exceptions, PIC, timer, and keyboard interrupts
  • physical frame allocation and virtual memory mapping helpers
  • kernel heap initialization
  • round-robin task scheduling with context switching
  • ring 3 entry and syscall handling on x86_64
  • ELF loading for bundled userspace binaries
  • first userspace shell loop with spawn, status, help, and quit flows

Repository Layout

.
├── GNUmakefile
├── limine.conf
├── kernel/
│   ├── Cargo.toml
│   ├── GNUmakefile
│   ├── linker-*.ld
│   └── src/
├── user/
│   ├── init.S
│   ├── child.S
│   └── init.ld
├── userspace/
└── limine/

Key areas:

  • kernel/src/main.rs: boot flow and kernel initialization
  • kernel/src/memory.rs: frame allocation, heap, paging, and ELF loading
  • kernel/src/scheduler.rs: task switching and process scheduling
  • kernel/src/process.rs: process metadata and fd-table groundwork
  • kernel/src/arch/x86_64/: architecture-specific bring-up, interrupts, syscall entry, and user-mode support
  • user/: bundled assembly userspace programs currently loaded at boot

Requirements

Typical Linux development setup:

  • Rust nightly with the x86_64-unknown-none target
  • GNU make
  • nasm
  • xorriso
  • qemu-system-x86_64
  • mtools and sgdisk for HDD image targets

The project currently assumes a Unix-like development environment.

Building

Build the default ISO image:

make all

Run the kernel in QEMU:

make run

Build only the kernel binary:

make -C kernel

Build the bundled userspace binaries:

make user-init

Smoke Tests

There are several QEMU-based smoke targets for targeted subsystem validation.

Examples:

make smoke
make smoke-memory
make smoke-heap
make smoke-paging
make smoke-scheduler
make smoke-user-mode
make smoke-init-process
make smoke-user-wait

These are intended to catch regressions while the kernel grows beyond the current bootstrap phase.

Development Notes

  • x86_64 is the primary active target.
  • Other architectures have scaffolding in the tree, but they are not at the same maturity level.
  • The syscall layer and userspace ABI are still evolving.
  • The public direction is toward a more Unix-like process, fd, filesystem, and shell environment.

Status

Kio is an active work-in-progress kernel project. It is already beyond the boot-demo stage, but it is not yet a general-purpose operating system.

That means:

  • expect breaking internal changes
  • expect incomplete POSIX behavior
  • expect unfinished subsystems while core architecture is still being built out

License

This project is licensed under the terms in LICENSE.

About

kio is a from-scratch Rust-based kernel exploring modern operating system design, including memory management, scheduling, and low-level hardware interaction, with a focus on safety, performance, and clean architecture.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors