Issue #1494: A Linux kernel module written in Nikaia: what a kernel target keeps, refuses and needs beyond the bare-metal target

Open and answer this issue on GitHub.

targets, decision, future · opened 2026-11-09 · updated 2026-11-09 · 0 comments

Where it comes from

The owner asked (2026-11-09) about kernel developers who must control how memory is managed. The bare-metal target (ADR-119) is the nearest thing specified, and it does not cover a kernel. This blocks nothing today (future).

Today’s state

ADR-119 (accepted, not built) gives a target without an operating system: emitted Rust is no_std with core and alloc, a failure aborts without unwinding, interrupts are wakers to the target’s executor, user_parallelism is no, runtime settings are baked in at build. Nothing is said about a kernel.

What a kernel needs that ADR-119 does not give

How others do it

Options

  1. Do nothing: no kernel target; Nikaia stays for user space and bare metal.
  2. A kernel target as a column of Part III’s targets section, lowered onto Rust for Linux: Nikaia emits Rust against the kernel crate, allocations are fallible (the setting of #1493), locks map to the kernel’s, failures become error codes at the module’s entry points.
  3. Nikaia as a C library inside the kernel (ADR-284 style, with a kernel allocator handed in): smaller, but every boundary is C and the kernel’s rules are not checked.

Recommendation

Option 1 for now and option 2 as the goal, decided after #1493 and after ADR-119 is built, because a kernel target reuses both. Option 3 gives up what Nikaia is for: the kernel’s rules (context, locks) would go unchecked.

Related: ADR-119, ADR-284, #1493, #490.

Back to Open Issues