Nupp is LuaJIT with checked types, resource contracts, concurrency, and native compilation. It keeps ordinary Lua modules and control flow while adding the information needed to check, optimize, and package a program.
local record Point
x: number
y: number
end
local function scale(point: Point, factor: number): Point
return new Point(x = point.x * factor, y = point.y * factor)
end
print(scale(new Point(x = 3, y = 4), 2).x)
The built-in application template includes a manifest, a checked module, a test, and the tasks that run them:
nupp init app hello
cd hello
nupp check
nupp test
nupp task startSee Getting started for the daily loop and the browser, library, SIMD, and LÖVE templates. Building Nupp itself from a source checkout is documented separately in Installation.
.lua,.g.nupp, and.nuppprovide plain, gradual, and strict source boundaries under one module resolver.- Records, structs, interfaces, unions, refinements, generics, and narrowing add checked structure. Native LuaJIT targets represent structs as FFI cdata; portable targets select a checked table representation.
- Affine ownership, borrowing, pinning, and exact scopes track cleanup and C pointer lifetimes.
- Suspension, task scopes, and worker pools express waiting and parallel work without changing a function's return type.
- Comptime evaluation, type computation, reflection, and derives produce checked data and declarations during compilation.
- The standard library covers files, networking, TLS, HTTP, processes, data formats, hashes, parsing, memory views, GPU storage, and model assets.
The Feature map links each area to the page that owns its rules. The complete checking model is under Types.
Configured targets can lower for native LuaJIT or the portable Lua 5.1 surface, which runs on Lua 5.1 through 5.4 and LuaJIT. Builds can produce module trees, bundles, standalone binaries, embedded components, and browser packages.
@aot lowers admitted CPU functions to C or Wasm, including automatic or
explicit SIMD. @aot(target = "gpu") produces checked resident-buffer kernels,
structured workgroups, and native or WebGPU artifacts. See
Ahead-of-time compilation and
GPU compute.
One executable provides checking, building, testing, formatting, editor services, documentation, profiling, coverage, migration, C import and export, ownership audits, and compiler inspection. Diagnostics carry stable codes, source spans, related locations, repair help, and structured fixes.
See Tooling for the guided command map, CLI reference for exact options, and the playground for browser-compatible examples.
