Luce / engineering
Learn Luce LuciaOS

What is Luce and what is Zig

This map shows where each part of the system is implemented. It answers which repository directory owns a behavior and which boundary connects it to the next layer.

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.

The compiler and runtime remain Zig. Standard algorithms, packages, and applications exercise Luce as userland and can evolve through ordinary language source.

Why the compiler and runtime are Zig

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 accurate alias, effect, and lifetime metadata