v9.17.0 — Now with a native render engine

Build AI. Ship UI.
Control memory.

Serez Code is a general-purpose language with native AI, terminal UI, GPU compute, and systems programming — all in a single runtime. No GC pauses.

433
Tests, 0 failing
0
GC pauses
28
Exact decimal digits
train.sz
import "serez-ai"

Random.seed(42)

// Build a neural network in 3 lines
let model = new Sequential()
model.add(new Dense(2, 32, "relu"))
model.add(new Dense(32, 1, "sigmoid"))

// Train with Adam optimizer
let opt  = new Adam(0.01, 0.9, 0.999)
let hist = model.fit_opt(X, y, new BCE(), 500, opt, false)

out "Final loss: " + hist[hist.length() - 1]   // 0.0021

Everything you need. Nothing you don't.

One language. One runtime. Zero compromises.

Native AI

Built-in autodiff, neural layers (Dense, Conv2D, LSTM, Attention), and optimizers (Adam, SGD, Momentum). Train models in pure Serez — no Python needed.

UI: terminal & native

serez-ui: a React-style library — components, a virtual DOM and hooks. The same code runs as a terminal UI (TUI) or a native desktop window (GUI), with a responsive .szs stylesheet.

Exact decimals, natively

dec is a first-class base-10 type with 28–29 digits: 19.99m, 0.1m + 0.2m == 0.3m, scale preserved. It is not a library — and the compiler refuses to mix it with binary floats, so the classic lost-cent bug is a type error, not a silent rounding. Money, invoicing and COBOL-grade arithmetic without leaving the language.

GPU Compute

CPU-backed GPU compute buffers with matmul, axpy, dot, reduce, and map. Same API, zero driver hassle.

Flash Scopes

Open a bare { } block anywhere and everything declared inside it is released at the closing brace — not when a collector decides. Build a large structure, keep only the slice you need in a variable declared outside, drop the rest. Memory that follows the shape of your code.

Systems Control

Raw memory access, pointer arithmetic, unsafe blocks, and sizeof — all with the ergonomics of a high-level language.

Package Manager

sz install, sz uninstall, sz publish. Local and HTTP registry support. Packages live in ./packages — visible, portable, no magic.

Safe by Design

Typed arrays, bounded arithmetic, private fields, sealed classes, and a test suite of 388 files including a dedicated security section.

See it in action

From neural networks to raw memory — all in the same syntax.

invoice.sz
// dec is a base-10 type built into the language, not a library.
// Binary floats drift; dec does not.
let a = 0.1 + 0.2        // decimal (f64) — binary
let b = 0.1m + 0.2m      // dec — exact
out a == 0.3             // false
out b == 0.3m            // true

// Scale is preserved, so "12.50" stays "12.50"
let price = 12.50m
let qty   = 3
let vat   = 0.21m
let net   = price * qty              // 37.50
let total = net + net * vat          // 45.3750
out "Total: " + total.setScale(2)    // 45.38

// And the compiler refuses to silently mix exact with binary:
// let bad = price * 0.21
//   -> ERROR: cannot mix 'dec' (exact) and 'decimal' (f64)
//      convert explicitly (d.toDecimal() / Dec.parse)

Official packages

More packages →

serez-ui

v1.5.0
UITUIGUI

React-style UI library — components, a transparent Virtual DOM and hooks. 13 built-in components, responsive .szs styling, word-wrap and scrolling. Runs in the terminal (TUI) or a native window (GUI).

$sz install serez-ui

serez-ai

v1.0.2
AIMLAutodiff

Neural networks, autodiff, and training loops. Dense, Conv2D, LSTM, Attention, BatchNorm, Dropout, Adam/SGD/Momentum. Keras-like API.

$sz install serez-ai

serez-agentai

v1.0.0
AITransformerAgent

GPT-style transformer stack + agentic framework — tokenizer, causal attention, KV-cache, sampling, tool calling and episodic memory.

$sz install serez-agentai

serez-cobol

v2.0.0
COBOLTranspilerDecompiler

COBOL ⇆ Serez source-to-source translator and reverse compiler. Run legacy COBOL code on the Serez runtime with exact fixed-point decimal arithmetic.

$sz install serez-cobol