Lumina

TypeScript ergonomics, Rust-grade correctness, native performance.

Lumina is a statically typed, compiled language. It reads like TypeScript, but its compiler works more like Rust's: it checks exhaustiveness, mutability, error handling and side effects. It compiles through LLVM to native code, either JIT-executed (lumina run) or ahead-of-time built into a binary (lumina build).

These pages describe where Lumina is going. A small badge such as mostly done, in progress or designed marks what is nearly done, still partial or only designed (see the status legend), and Status & Roadmap says exactly where each point stands.

function main(console: Console): Integer {
    name = "Lumina"
    console.println(`Hello, {name}!`)
    return 0
}
$ lumina run hello.lumina
Hello, Lumina!

Why Lumina?

If you write TypeScript, Go, Python or Rust, you have probably wished for some feature from one of the others. Lumina combines them on purpose:

A taste

function parseAge(text: String): Integer!ParseError {
    if text.length() == 0 {
        return Err(ParseError.Empty)
    }
    return match text.toInteger() {
        Some(n) => Ok(n),
        None => Err(ParseError.NotANumber { text: text })
    }
}

function doubledAge(text: String): Integer!ParseError {
    age = parseAge(text)?          // early-return on error
    return Ok(age * 2)
}

The error type is part of the signature, ? keeps the happy path flat, and if you forget to handle a ParseError variant in a match, compilation fails.

Honest status

The core pipeline works end to end (source, AST, HIR, MIR, LLVM IR, then JIT or AOT), and every code sample in these pages was run with the current compiler. Each badge links to its entry in Status & Roadmap. For live numbers, run cargo run --bin lumina_analyze in the repository, or read FEATURE_STATUS.md and ROADMAP.md.

Pages

  1. Syntax: variables, functions, structs, lambdas, loops
  2. Mutability: const by default, mut, explicit copies
  3. Errors & Types: T?, T!E, ?, ??, enums, match, narrowing
  4. Generics & Interfaces: bounds, generic structs, operators
  5. Capabilities: pure by default, effects as parameters, testing with fakes
  6. Async: async/await, spawn, channels, cancellation, streams
  7. Memory: escape analysis, GC fallback, @Memory annotations
  8. Zero-Copy & Servers: TCP/HTTP, splice, peek, io_uring
  9. Interop & Stdlib: @ExternC, JSON, crypto, regex, reflection, LLM effect
  10. Tooling: run, build, test, lint, fix, explain, LSP, packages
  11. Built for Agents: fast, quiet compiler feedback for coding agents, and agents hosted inside Lumina programs
  12. Comparison: what Lumina takes from TypeScript, Go, Python and Rust
  13. Status & Roadmap: exactly what works today and what is planned

The full language reference is Language.md in the repository root.

Next: Syntax