Luce Base
LuceEngineeringLuciaOS

23. Relationship to Luce 1.0

Base is a profile of Luce, and this document restates every shared rule so that it can be read alone. For a reader who knows full Luce, these are the differences, and the reason for each.

AreaFull LuceBaseWhy
Reference identityclass, ARC, weak, deinitnoneno runtime
Collectionslist, map, set built inlibrary types over Allocatorno hidden allocation
Textowned, reference-counted str; + concatenatesstr is a view; no +no owner for a fresh string
Slicesslice[T] retains its ownerT[] is a non-owning spanno reference counting
Pointersnative_ptr[T] in audited modules onlyT* everywhere, C spellingBase is the native tier
Optional pointerstoken plus flagnull nicheC layout of struct fields; Base pointers are not handles
Interface valuesboxed, copy-on-writeborrowed two-word viewno owner for a box
Closuresenvironment capturecapture-free function pointersno owner for an environment
ErrorsError.message ownedError.message a viewno allocation
Out of memoryfatalrecoverable T!bounded systems handle it
Zero valuesevery local initialisedtyped var of a zeroable type is zeroC idiom, with never-null types excluded
Globalsnonezeroable var, thread_local varC needs them; no initialisation order
Labelsrefusedbreak label, continue labelstructured jump the representation already has
Non-mutating selfa copyconst Self*no copy per call; deterministic C header
Displayreturns owned strwrites to a Writerno allocation
Atomics, volatile, asm, union, usizeabsentpresentC capability, with a checkable restriction
Module suffix for audited code.native.luc.lucnone scheme for three kinds
Exportexport c funcexport func, opt-inone word for a linker promise

Five rules change for every module, Base or not, and are recorded here so that the 1.0 specification can be updated to match: the audited-module suffix becomes .lucn; Plain joins the closed list of compiler-known marker protocols; native.retain_handle, native.borrow_handle, and native.release_handle join the closed intrinsic set of .lucn modules; the shared intermediate representation gains the additions of §19.2; and labels and mutable globals, excluded in full Luce, are admitted in Base modules only.