KEI

KEI

A Rust kernel for industrial edge gateways — Linux syscall ABI, ARM64 and RISC-V.

License: SySL
License: MPL-2.0
Checks

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français · Español · Русский · العربية

What is KEI?

KEI is a Rust kernel for ARM64 and RISC-V edge gateways. It implements the Linux syscall ABI, so gateway services written for Linux run unmodified, and it requires an MMU. It is not an RTOS and has no microcontroller target.

The microcontroller tier is served separately by the kei library (packages/kei/), a #![no_std] crate for embassy sensor nodes. Both tiers share one contract: the same hardware manifest and the same wire protocol.

KEI began as a fork of Asterinas and now carries its own vendored tree. It no longer tracks upstream.

mermaid

The kernel carries no industrial protocol drivers. Modbus, S7comm and the rest live in gateway user space, above the syscall ABI.

Status

KEI is a research kernel. No shipped Celestia service runs on it, and the kernel has no product consumer.

The part with production consumers is the kei library under packages/kei/.

What's in this repo?

ComponentLocationWhat it does
KEI kernelworkspace rootRust kernel for ARM64/RISC-V gateways. Linux syscall ABI (MMU required), virtio-gpu, framebuffer, network stack. Not an RTOS; no MCU target.
kei librarypackages/kei/#![no_std] library for embassy sensor nodes: wire protocol, manifest schema, HAL traits.

Quick start

Kernel:

bash
1
2
just build        # Build for default board (NanoPi R3S)
just test-all     # Boot-test all architectures in QEMU

Library:

bash
1
2
3
cd packages/kei
cargo test --all-features    # 20 tests
cargo run --example host_demo  # Wire protocol demo

See the library guide and benchmark results for details.

Desktop rendering (aris)

The aris-render desktop (Blitz HTML/CSS layout + Vello CPU rasterization → /dev/fb0) requires the aris repository. Point kei at your aris checkout via the ARIS_REPO environment variable:

bash
1
2
3
4
5
cp .env.example .env
# Edit .env and set ARIS_REPO to your aris repo path, e.g.:
#   ARIS_REPO=../aris        (sibling directory — the default)
#   ARIS_REPO=/home/me/aris  (absolute POSIX path)
#   ARIS_REPO=D:\source\aris (absolute Windows path)

Build commands follow a two-level convention (just build <object>):

bash
1
2
3
just build browser aarch64   # compile aris browser engine only (musl cross)
just build desktop aarch64   # full stack: kernel + browser + initramfs
just render aarch64          # launch QEMU with aris-rendered desktop

The justfile auto-loads .env (via set dotenv-load). If ARIS_REPO is unset, it falls back to ../aris (sibling directory layout).

License

SySL-1.0 for KEI's own code. Vendored Asterinas code under MPL-2.0. See LICENSE and LICENSE-MPL.