r/OSdevAI

ChittiOS: a no_std OS in Rust where the unit of execution is an agent, not a binary
▲ 8 r/OSdevAI+1 crossposts

ChittiOS: a no_std OS in Rust where the unit of execution is an agent, not a binary

I've been writing an OS in Rust for the last few months — no_std, one codebase
for x86_64 and aarch64, no libc and no POSIX layer. The unusual part is what it
runs: instead of loading a binary it runs an LLM agent, and every effect the
model asks for goes through a capability-checked ABI in the kernel, so it can
plan anything and only do what it was granted.

The Rust-specific parts that took the longest:

- No ring, since it won't build bare-metal. TLS 1.3 certificate verification is
  hand-rolled on x509-cert + p256/p384, with RSA PKCS#1 v1.5 and PSS on
  crypto-bigint. The crypto ecosystem assumes std in more places than the
  feature flags suggest.

- +strict-align silently scalarizes NEON. The aarch64 target needs it for the
  pre-MMU boot window and device MMIO, and under it LLVM lowers every unaligned
  vector load — intrinsics and auto-vectorized loops alike — into about 25 byte
  ops with a stack spill. The binary still contains fmla, so it looks correct
  until you disassemble the loads. Hot kernels do their memory access through
  inline asm now, and I check with objdump rather than trusting the source.

- The decoders (PNG/JPEG, MP3/AAC, H.264/H.265/VP9) are in-kernel and no_std.
  The untrusted ones run in ring 3 as a userspace tenant that mounts the
  kernel's own source with #[path], so porting one can't fork it into two
  implementations that drift.

Research OS — not stable, run it in a VM. Apache-2.0, prebuilt images for both
arches in Releases

https://github.com/chittios/chitti
u/vinothsparrow — 6 days ago