Luce / engineering
Learn Luce LuciaOS

Packages and userland

A package is versioned Luce source. The loader adds it to the application's ordinary module graph, where the compiler applies the same type, memory, and test rules as project source.

The project manifest

luce.yaml names the project root and exact package requirements. Root-relative dotted imports map to directories under that identity. Package resolution probes the supported local, store, shelf, and path locations. One unambiguous package with the requested version must be present.

A package on disk

luce.yamlname, exact version, and dependency requirements
module.lucordinary public/private source files reached by dotted imports
tests/*.lucordinary Luce test declarations discovered by the toolchain

TermUI stays a package

termui ships with the release as a versioned package. Its components, layout constraints, drawing, event handling, and application lifecycle all pass through normal package loading and language compilation.

Application-scale examples

Terminal editorDocuments, undo history, syntax registries, LSP client, UI components, tests, and a complete application in Luce.
LSP serverProtocol framing, positions, diagnostics, project manifest, and tests in Luce.
AdventureSeveral modules combining classes, values, collections, commands, journal state, and narrative logic.
AlgorithmsSorting, word count, cellular life, calculator, BF interpreter, statistics, and zipper examples.

The current distribution boundary

The toolchain consumes exact package versions from configured local locations. Remote publication and compatible-version range selection remain future distribution work. Exact requirements currently make the chosen source identity deterministic.

Why examples are part of engineering

Small language specs isolate one behavior. Packages and applications exercise interactions across large branches, UI-model lifetimes, module resolution, test discovery, and public APIs. Running both levels catches local rule errors as well as failures that appear only when features compose.