Luce / engineering
Learn Luce LuciaOS

What is Luce and what is Zig

“Written in Luce” and “written in Zig” are not marketing labels. They answer where you would open the repository to change a behavior. This page is that map.

Filter the implementation map

Repository ownershipChoose a territory to isolate it
std/*.lucportable library algorithms and public wrappers
packages/*.luctermui and maintained userland packages
examples/*.luceditor, LSP, adventure, algorithms, and complete programs
source → MIRloading, lexer, parser, semantics, HIR, MIR, verifier, optimizer
runtimeValue, object table, ARC, containers, text, resources, workers, traps
appsCLI, loom, concrete host, native loader/linker, manifests, streams
oracle/specsindependent MIR dispatch and native-vs-reference comparison
LLVMgeneral optimization, instruction selection, object emission
cc + loaderplatform link, shared-library loading, relocation, process entry
OSfiles, terminal, time, threads, process, sockets, windows, GPU

What is written in Luce

The standard algorithms for strings, paths, JSON, ZIP/DEFLATE, HTTP, IO loops, list sorting, and much of math are language source. So are the termui package, the terminal editor, the LSP server, and bundled applications. Hosted public APIs remain Luce declarations even when their final primitive crosses to Zig.

This is a self-hosting gradient, not a claim that the compiler is self-hosted. Userland proves that Luce can build meaningful software while the trusted compiler/runtime base remains Zig.

What must be Zig today

The compiler needs byte-level parsers, arenas, LLVM construction, native object handling, and diagnostic infrastructure. The runtime needs precise C layout, allocators, atomic/thread integration, host callbacks, and platform resource destruction. The apps need filesystem loading, process launch, dynamic loading, and terminal/window adapters.

What belongs to native tooling

LLVM performs target-independent and target-specific optimization, selects machine instructions, assigns physical registers, and emits an object. cc supplies platform startup objects, SDK paths, libraries, and the final link. The OS loader maps the executable or .lc, applies relocations, and exposes the entry symbol.

The placement test

If the behavior...It belongs...
can be expressed portably with current language semanticsin Luce source
defines heap identity, lifetime, representation, or trapsonce in the Zig runtime
decides source meaning or emits protocolin the owning Zig compiler stage
touches platform statebehind the host table in an app adapter
is general machine optimizationin LLVM, informed by truthful metadata