Luce
Luce is a small language that reads like Python and compiles like a systems language. Values copy, classes share, memory takes care of itself, and failure is a type you can see. Underneath it sits Luce Base, the systems language the compiler is written in. Anything about the machine lives there, and a Luce program gets at it with an import.
Install#
macOS or Linux, in a terminal:
curl -fsSL https://luce.luciaos.com/install.sh | shWindows, in PowerShell:
irm https://luce.luciaos.com/install.ps1 | iexThat downloads release 0.2.7, checks the SHA-256, unpacks it into ~/.local/luce (%LOCALAPPDATA%\luce on Windows) and puts bin on your PATH. Open a new shell and check:
luce --versionRun it again whenever you like. It fetches a fresh copy and only swaps the old one out once the new one checks out, so a dropped connection can't leave you with half an install.
What you need#
luce build turns your program into Base and hands it to luce-base, which uses the C toolchain on your machine to assemble and link. The installer looks for that toolchain before it changes anything, and tells you what to install if it's missing:
| System | What it needs | How to get it |
|---|---|---|
| macOS 15+, Apple Silicon | Xcode command line tools | xcode-select --install |
| Linux x86-64, glibc 2.35+ | gcc or clang, plus binutils | sudo apt install build-essential, sudo dnf install gcc, or sudo pacman -S base-devel |
| Linux ARM64, glibc 2.35+ | gcc or clang, plus binutils | sudo apt install build-essential, sudo dnf install gcc, or sudo pacman -S base-devel |
| Windows 10+, x86-64 | MSYS2's UCRT64 gcc on your PATH | pacman -S mingw-w64-ucrt-x86_64-gcc, then add C:\msys64\ucrt64\bin to PATH |
luce run doesn't need any of that. The interpreter runs a program on its own, and it's the reference for what the language does.
What you get#
One folder:
luce-0.2.7/
bin/luce the compiler and interpreter
bin/luce-base the Luce Base compiler it builds through
lib/luce-base/<host>/ Base's standard library, libstd.a and libstd-c.a
share/luce/ licences, VERSION, and these docsluce finds luce-base next to itself, and luce-base finds the library next to its bin, so the folder works wherever you put it. Programs you build link the runtime and the standard library statically. The binary you get needs nothing from this folder, and runs on any machine of the same kind. If you also install Luce Base, the two don't interfere.
First program#
Save this as hello.luc:
pub func main(arguments: list[str]) -> int!:
print("hello from luce")
return 0Try it in the interpreter, then build it:
luce run hello.luc
luce build hello.luc -o hello
./helloluce check looks without building, luce test runs a file's tests, luce fmt formats, luce doc prints the public surface, and luce explain tells you what a name at a position is. Run luce with nothing after it for the full list.
Where to go next#
Language is the language, one chapter at a time. It's the same document the compiler is held to. Runtime is about when objects die, and in what order. Design is how the compiler is put together, Plan is what's still to do, and Projects is what people have built with it so far.