Field note 01218 Aug 2026M12 in flight

Source in.
Process out.

The host compiler used to be the end of the Lux toolchain. Now its frontend can live inside Yggdrasil, behind a process-owned port: submit source, receive verified code.

KIND_LUXC / port 05 service
01 / buffersource.luxUTF-8
02 / OP_LUX_COMPILEfrontendparse · type · emit
03 / load_sealedverified modulecontent addressed
04 / OP_LUX_RUNprocessmonitored · timed
SQ / CQaliases reboundJIT published
03repositories converged
05commits in the trail
02compile / run ops
08 MiBbounded compiler stack
00 / Five commits

Three repositories,
one runtime boundary.

The kernel service is the newest step. Its prerequisites landed first, in public, across RedMagic, Lux, and Yggdrasil.

  1. RedMagic · cb64b36 The system library gets a home.

    Disk storage, secure random, TCP/IP, TLS 1.3, terminal, REPL, and device programs move into a sibling Lux standard library.

    19 files · +3,908
  2. Lux · 0fd91f4 GPU and terminal code become reusable.

    Font atlases, 2D GPU commands, GPU text, virgl helpers, terminal examples, and a TCP REPL become importable Lux libraries.

    30 files · +7,929
  3. RedMagic · 9968ac8 The ANSI terminal stops repainting the world.

    Dirty cells, batched vertex uploads, virgl text, non-blocking serial input, frame pacing, and a 2D fallback replace full CPU redraws.

    1 file · +369 / −70
  4. Yggdrasil · 0b5f13f The runtime catches up to its programs.

    Sealed-module calls bind directly, byte indexing stops allocating, KVM becomes automatic, and RedMagic joins the boot and acceptance path.

    16 files · +1,297 / −108
  5. Lux · 3b467ff The frontend loses its dependence on the host.

    Lexer, parser, type inference, use expansion, and Yggdrasil output become a no-I/O, no_std-capable crate.

    36 files · +888 / −257
State of record

The five hashes above are committed. The KIND_LUXC service and RedMagic repl_core described below are the next M12 working-tree step as observed on 18 August—not yet part of those hashes.

01 / RedMagic

The operating system found its system library.

Yggdrasil had already run substantial Lux programs. RedMagic turns that growing pile into a named layer: the programs that make a minimal runtime feel like a system.

Its first commit collects the TCP/IP stack, persistent disk adapter, secure-random bridge, pure-Lux TLS 1.3 client and server, GPU programs, font demo, terminal, and TCP REPL. Yggdrasil’s build compiles them with the sibling Lux compiler and installs one content-addressed module pack in the boot image.

RedMagic / ansi_terminal.luxcaptured output
The Yggdrasil Lux terminal showing antialiased text, TCP REPL instructions, and a prompt
480 × 160 captureAdwaita Mono AAvirtio-gpu
This is a RedMagic program owning the display.

The capture predates the virgl fast path, but it already proves the layer boundary: font rasterization, terminal state, colors, cursor, and scanout policy live in Lux.

The next commit made it behave like a terminal, not a framebuffer demo.

RedMagic’s renderer now marks dirty cells, batches glyph vertices into a VBO, presents only the affected rectangle, drains serial input without blocking, and paces frames at sixteen milliseconds. It prefers the reusable gpu_text virgl pipeline and retains a 2D CPU-blit fallback. The optimization belongs in the system library because it is policy about text, cells, and frames—not a kernel concern.

02 / Lux

A compiler frontend with nowhere to hide an OS dependency.

Commit 3b467ff extracts lux-frontend: lexer, parser, type inference, Core lowering, and the Yggdrasil backend, with no filesystem, database, network, or native-code backend attached.

Inputsource textplus a SourceProvider
Frontendparse + inferin memory
BackendYgg modulesverified format
Outputhashes + aliasescontent addressed

The public call is compile_to_yggdrasil. A caller supplies source and a SourceProvider; the frontend expands use dependencies, checks types, translates each function, and returns encoded modules, aliases, and an optional main/0 entry. On the host, the provider can read files. In the kernel, it reads a boot-shipped source pack.

Fresh host verification 65 frontend tests + 4 Yggdrasil backend tests passed.

That includes in-memory compilation, provider-based use resolution, hostile-input coverage, content-address invariants, and interpreter execution.

03 / Yggdrasil working tree

Port kind five is a compiler service.

The kernel imports lux-frontend without std, gives its recursive pipeline a bounded eight-mebibyte stack, and exposes two operations through the same SQ/CQ port model used for disks, networks, random bytes, and the GPU.

OP 1 / COMPILEconsume a UTF-8 source bufferok entry · module count · aliases
err span diagnostics
OP 2 / RUNconsume an entry-module hashformatted value · exit reason
or timeout
Processsubmit source
Luxccompile in kernel
Verifierload sealed
JITpublish RX
Runnermonitor + reply

Successful output is loaded as immutable, content-addressed modules. Aliases are rebound only after load. That matters because the previous runtime commit can turn external calls between sealed modules into direct native calls: source compiled inside the kernel enters the same optimized code world as boot-time RedMagic.

Running is intentionally separate. OP_LUX_RUN resolves apply/0 and launches it in a disposable process. A waiter monitors that process, formats a value or exit reason, and kills it if the caller’s timeout expires. A bad program can fail, block, or loop without wedging the service port.

Compilation is not a privileged command bolted beside the process model. It is another process-owned service inside it.
04 / The loop closes

The terminal can ask the system to make new code.

RedMagic’s in-flight repl_core opens port kind five from Lux. Everything above that primitive—line editing, continuations, definition replacement, session state, diagnostics, and formatted results—stays in Lux.

fn repl_init() -> ReplState {
    ReplState { luxc: ygg::port_open(5), defs: [], cont: "", depth: 0 }
}

fn rc_compile(state: ReplState, source: String) -> String {
    rc_port_call(state.luxc, 1, source, 0)
}

fn rc_run(state: ReplState, entry: String) -> String {
    rc_port_call(state.luxc, 2, entry, 5000)
}

Expressions are wrapped in a temporary main, compiled, and run. Function, struct, type, extern, and use definitions persist for the session and are resubmitted as one unit. Both the serial GPU terminal and the TCP REPL share the same core. The system is no longer limited to executing the program chosen when the ISO was built.

type Luxcompile serviceverified modulenew process
05 / Proof and limits

The boundary is implemented. The milestone is not stamped complete.

The current self-test contract checks the dangerous edges, but the service remains an in-flight M12 change until its repository commit and full QEMU acceptance run land.

Frontend65 / 65

Unit and integration tests passed on the host.

Ygg backend4 / 4

Compile, verify, and interpreter execution tests passed.

Runtime crates19 / 19

Bytecode, interpreter, and JIT host tests passed.

Kernel acceptanceWritten

In-kernel compile, hash parity, diagnostics, run, and timeout assertions are present.

01
Compilation is serialized.

One lock protects a single large compiler stack. Parallel compile requests wait.

02
The source library is a boot snapshot.

use resolves from lux_src.pack; updating those libraries still means rebuilding the image.

03
The compiler runs trusted.

The verifier still checks emitted bytecode, but frontend resource accounting needs to mature before arbitrary hostile users get this port.

04
M12 is in flight.

The service and REPL core are working-tree evidence, deliberately separated here from the five public commit hashes.