SCUA

A scripting language for games, servers and agents.

SCUA is a general-purpose language. Use it where you would reach for Python or Lua: tools, data jobs, services, the logic inside a game. It is strongest in games, the servers behind games and apps, and AI agents, because saving a running program, sandboxing code and a JIT are part of the language.

JIT on by default State saves and moves Access by grant only Serves HTTP Embeds in C 64 packages

No public download yet. The playground runs the real compiler, and the sample on this page runs when you press Run.

boundary.scua
-- Check data where it arrives, then trust it everywhere else.
record Item { id: string, qty: int where qty > 0 }
record Player {
  name:      string,
  hp:        int where hp >= 0,
  inventory: { Item },
}

let incoming: any = { name = "Ana", hp = 80,
                      inventory = [{ id = "bow", qty = 1 }] }
let ana = parse(incoming, Player)
print(`recruited {ana.name} with {ana.hp} hp`)

let bad: any = { name = "Bo", hp = 70,
                 inventory = [{ id = "axe", qty = 0 }] }
try parse(bad, Player) rescue e print(e.message) end
$ scua boundary.scua
recruited Ana with 80 hp
parse(bad, Player): bad.inventory[0].qty violates Item's where rule (got 0)

Where it fits

Four kinds of work it is good at

The syntax will feel familiar in a few minutes. Pick the job closest to yours.

State that saves and moves

Save or move a running session as bytes

Each partition, which is SCUA's kind of actor, keeps its state in one block of memory that does not care where it sits. So a host can write that block to a file, or send it to another machine, and the session carries on from where it was. You do not write a save function or a load function, and nothing is converted to JSON on the way.

That one property is behind moving a player to a less busy server, sleeping an agent while it waits for a slow model, and resuming a job after a restart.

See how state moves →
Server A Server B the session has left its memory is free again the bytes, as they are no save code, no load code player 4821 running frozen hp80 position(12, 4) quest"the keep" same script, same state 1Freeze between two messages 2Send the bytes 3Load them and carry on
Server A the session has left its memory is free again the bytes, as they are no save or load code Server B player 4821 running frozen hp80 position(12, 4) same script, same state 1Freeze between two messages 2Send the bytes 3Load them and carry on
A session is frozen between two messages, its bytes are sent, and the other server loads them and carries on.

Safe to run code you did not write

A script touches only what it was given

A SCUA script starts with no access to your files, the network, the environment or other programs. The host grants each one, and can grant a slice: one folder, one host name, one port. A script that asks for anything else is told which grant is missing.

Code from a player, a plugin author or a language model can also be compiled at run time into a sandbox that holds nothing at all, with a limit on how much work and memory it may use.

See how grants work →
A script code you did not write read a file open a connection read the environment run a command starts with nothing Files ./scratch the rest Networkany host, any port Environmentkeys, tokens, paths Other programsrunning a command --allow-fs=./scratch not grantednot grantednot granted the boundary: only a grant passes
A script starts with nothing a file a socket env vars a command stopped at the boundary: not granted Files --allow-fs=./scratch ./scratch everything else: not reachable Network Environment Programs Each refusal names the grant that is missing.
The host granted one folder. The script's other three requests stop at the boundary, and each error names the grant that is missing.

Fast without a flag

Keeps pace with LuaJIT, with no flag to set

Hot loops compile to native code while the program runs. The JIT is on by default on x86-64 and ARM64, so there is nothing to switch on. With it off, the interpreter runs at about the speed of Lua 5.4's. With it on, SCUA trades places with LuaJIT from workload to workload, and both are far ahead of Python.

Where there is no JIT, as on Windows on ARM, in WebAssembly, or on a platform that does not allow code to be generated at run time, the same program runs on the interpreter.

More on speed →
Time to run three workloadsshorter is better; each group is scaled to its longest bar
PathfindingLua 5.4175 msSCUA, JIT off143 msLuaJIT57.4 msSCUA45.2 msGame loopLua 5.458.1 msSCUA, JIT off61.7 msLuaJIT8.2 msSCUA7.2 msPhysics stepLua 5.4252 msSCUA, JIT off232 msLuaJIT14.7 msSCUA16.6 ms
Our benchmark suite, 23 November 2026, a SCUA build compiled for the host CPU on x86-64 Linux: whole-process wall-clock, the best of at least five runs, every runtime's answer checked equal. On the same three workloads CPython 3.14 took 847, 323 and 1,367 ms.

A server in the language

Serve HTTP from a script, at Bun's pace

http.serve takes a handler and runs it for each request. Every request gets its own isolated state, so handlers can wait on a database or another service without blocking each other, and there is no async or await to thread through your code.

On the same machine, a handler that does real work answered more requests a second than Bun or uWebSockets.js, on one thread and on four: 146,210 a second across four threads, against 113,396 and 106,494. On a fixed plaintext reply SCUA was ahead of Bun and behind uWebSockets.js at both sizes.

SCUA for servers →
HTTP requests answered per secondlonger is better; each group is scaled to its longest bar
A handler that does work, one threadSCUA 0.3546,804 req/sBun 1.4.234,020 req/suWebSockets.js 20.7133,921 req/sNode 2422,382 req/sThe same handler, four threadsSCUA 0.35146,210 req/suWebSockets.js 20.71113,396 req/sBun 1.4.2106,494 req/s
One sitting on an Intel i7-10700 running Linux, October 2026: a 20,000-step loop per request, wrk over 256 connections, the median of three 10-second runs. Four threads uses SCUA's threaded scheduler; one thread is the default.

The full table and the handler are in the 0.35.0 release post.

Also in the language

Built in, where you would expect a library

Types when you want them

Write it untyped, or add annotations and get the mistake at compile time. Records, enums that carry data, and a match that must cover every case.

Records and types →

Data checked at the door

parse(value, Type) checks a whole tree of data once, and a contract reports every rule that failed, not only the first.

Contracts →

Exact money and huge numbers

A built-in decimal keeps prices exact to the penny, and big numbers keep counting past 64 bits.

Handle money →

Data tables

A frame is a table you filter, group, total and join with method calls, and read from CSV.

Query data →

Many things at once

wait_all and map_all run a batch of ordinary function calls and hand the results back in order. Under --io=async their waits overlap.

Run work in parallel →

Editor, debugger, tests

A language server and a step debugger for VS Code and Zed, scua test, and a playground that runs the real compiler.

Test your code →

Native libraries

An experimental FFI calls C libraries directly. We use it for the SQLite package: rows come back as tables, and every failure is a value.

Native libraries and FFI →

64 first-party packages

PostgreSQL, Redis, JWT, OAuth, an LLM client, charts, PDF, Excel, pathfinding, behaviour trees and more.

See the packages →

Where it runs

Runs on macOS, Linux, Windows and WebAssembly

SCUA is one binary on each desktop system. It also builds to WebAssembly, and it embeds in a C or C++ program through one header. iOS and Android are planned.

macOS Linux Windows WebAssembly iOS planned Android planned

Try it now

The compiler runs in your browser

The playground runs the real compiler, built to WebAssembly. Your code stays on the page.

Request early access

SCUA is in early access. Ask for it and we will email you when yours is ready.

No newsletter. One email when your access is ready. Privacy.

Early access is the binaries for macOS, Linux and Windows, a WebAssembly build, the language server, the debugger, the manual and the examples. What you get →