Most languages make you choose: safety or the web. Lumina doesn't.
Lumina is a statically typed, web-native language with HM type inference, algebraic types, and trait-based polymorphism, compiled to JavaScript and WebAssembly. It ships first-class js, wasm-web, and wasm-standalone target profiles so you can keep browser and platform glue on JS while pushing shared systems code to WASM.
The docs are the main learning surface. The playground is the lab: a single-source editor with curated examples, JS/WASM output, runtime execution, UI Preview, inferred Types, and polished diagnostics.
trait Summary {
fn label(self: Self) -> string
}
enum LoadState {
Idle,
Ready(Vec<int>),
Failed(string)
}
impl Summary for LoadState {
fn label(self: Self) -> string {
return match self {
Idle => "Loading...",
Ready(_) => "Ready",
Failed(message) => message
};
}
}
npm install -g lumina-langCreate hello.lm:
fn main() -> void {
print("Hello, Lumina!")
}
Run the basic workflow:
lumina check hello.lm
lumina compile hello.lm --target js --module cjs --out hello.cjs
node hello.cjsStart the REPL:
lumina repldemo/serves the Lumina-native marketing/site shelldocs-content/is the markdown source tree for the docs portaldocs-site/is the on-site documentation app backed by generated markdown dataplayground/is the focused single-source playground appdocs/is the generated GitHub Pages output and should be rebuilt, not edited by handsrc/contains the compiler, runtime, LSP, and stdlib implementation
- Lumina aims at the space between TypeScript ergonomics and Rust-style modeling.
- It keeps one language across browser UI, JS interop, and WASM workloads.
- It is a better fit than plain TypeScript when you want enums, pattern matching, traits, and stronger guarantees to survive all the way to the browser.
- Use
jswhen you want the fastest edit-run-debug loop, deep browser/Node interop, or an app shell that talks directly to browser and Node APIs. - Use
wasm-webwhen you want shared-core parity with JS, tighter runtime behavior, or worker-isolated browser execution for compute-heavy paths. - Use
wasm-standalonewhen you want the strict portable profile for import-light kernels, embedders, or WASI-style environments.
luminaCLI for check, compile, run, grammar, bundle, and REPL workflowslumina replwith multiline input, history, and persistent declarationsjs,wasm-web, andwasm-standalonetargets- Direct
.wasmemission with optional--emit-watdebug output - Reactive UI runtime, browser preview examples, and DOM-aware guidance in the playground
- Playground Types tab for HM declaration and expression inference
- JS and WASM tabs with highlighted generated output, WAT, binary metrics, copy, and download actions
- Diagnostics tab with click-to-jump rows and educational explain content
- Embed-ready playground links for docs, tutorials, and blog posts
lumina-lspplus a VS Code extension
- Docs home
- Getting Started
- Why Lumina?
- When to use JS vs WASM
- Capabilities
- Stdlib
- Web-Native Roadmap
- VS Code extension
npm install
npm run build
npm run lint:check
npm testRequires Node.js >=22.17.0.
Full local verification mirrors CI:
npm run typecheck
npm run lint:check
npm run build
npm run build:verify
npm run web:build
npm run test:browser:smoke
npm testRun the three web apps together:
npm run web:devPorts:
127.0.0.1:5173/- main site127.0.0.1:5173/docs/- docs app through the main dev entrypoint127.0.0.1:5173/playground/- playground app through the main dev entrypoint127.0.0.1:5174/docs/- docs app directly127.0.0.1:5175/playground/- playground app directly
Build the full publish tree:
npm run web:buildImportant notes:
- Edit markdown docs in
docs-content/, notdocs/ - Edit the docs shell in
docs-site/ - Edit the playground shell in
playground/ docs/is the generated GitHub Pages output
Licensed under either of:
- MIT (
LICENSE) - Apache-2.0 (
LICENSE-APACHE)
at your option.