Skip to content
nupp-langPublic

About

A typed programming language for LuaJIT with an optimizing compiler, AOT, SIMD, GPU, blocking style async, comptime, and built-in tooling

Topics

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Latest commit

 

History

5,344 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nupp

Nupp

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 Point(x = point.x * factor, y = point.y * factor)
end

print(scale(Point(x = 3, y = 4), 2).x)

Install

On Apple-silicon macOS:

brew install nupp-lang/tap/nupp

On 64-bit Windows:

scoop bucket add nupp https://github.com/nupp-lang/scoop-bucket
scoop install nupp

Linux archives and manual installation options are in the installation guide.

Start a project

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 start

See Getting started for the daily loop and the library and LÖVE templates. Building Nupp itself from a source checkout is documented separately in Contributing to Nupp.

Language and runtime

  • Checked .nupp source and plain .lua files share 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 lexical 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 guides cover each area. The complete checking model is under Types.

Compilation and deployment

Builds can produce module trees, bundles, self-contained binaries, and embedded components.

@aot marks CPU functions, including explicit SIMD, that the VM compiles natively. @aot(target = "gpu") produces checked resident-buffer kernels and structured workgroups. See Ahead-of-time compilation and GPU compute.

Tooling

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 and the CLI reference for exact options.

About

A typed programming language for LuaJIT with an optimizing compiler, AOT, SIMD, GPU, blocking style async, comptime, and built-in tooling

Topics

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages