A toy RISC-V kernel built with Zig for OS exploration (WIP).
  • Zig 97.7%
  • Linker Script 1.5%
  • Assembly 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-22 13:02:42 +08:00
assets docs: update demo webp 2026-07-05 21:17:24 +08:00
bootloader pin opensbi to v1.9 2026-10-22 10:42:20 +08:00
docs update dag.d2 and svg 2026-10-22 13:02:42 +08:00
os move user range to abi module 2026-10-22 11:34:27 +08:00
.gitattributes chore: add .gitattributes 2026-07-03 03:33:39 +08:00
.gitignore chore: rm fxxking .DS_Store 2026-05-05 00:47:30 +08:00
build.zig move user range to abi module 2026-10-22 11:34:27 +08:00
build.zig.zon chore: switch to zig 0.17.0 2026-10-03 18:33:23 +08:00
LICENSE docs: add MIT License 2026-07-06 01:43:40 +08:00
mise.toml use zls 0.17.0 2026-10-20 14:22:42 +08:00
Onlyfile make build.zig a DAG 2026-10-19 23:35:45 +08:00
README.md make build.zig a DAG 2026-10-19 23:35:45 +08:00

🌱 KrcyOS

A toy RISC-V kernel built with Zig for OS exploration.

The main repository is on kercycode.

Read only mirror exists on github.


 

Motivation

Just for fun.

Prerequisites

  • Zig (pinned to 0.17.0)
  • QEMU (>=11.0.0, if you don't have a real board)
  • Only (task runner if you like)

Skill issue? Click here.

Document

See here.

Getting Started

Clone

git clone https://code.kercy666.com/Kercy/krcyos.git
# if you prefer github:
# git clone https://github.com/KercyDing/krcyos.git
cd krcyos
# ...

Run

Note that it is supervisor-test.

zig build run
# or:
# only run

Build for real board:

zig build run -Dboard=real_board
# or:
# only real run

Press Ctrl+A + X to exit qemu.

More

For user-test:

zig build run -Dmode=user
# or:
# only run user

Run unit tests:

zig build test
# or:
# only test

Why not C/Rust?

No reason. Zig worth.

LICENSE

MIT