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.
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 loss = model.fit_opt(X, y, new BCE(), 500, opt)
out "Final loss: " + loss // 0.0021Everything 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.
Terminal UI
serez-ui: a retained-mode TUI library with widgets, layouts, and Unicode box drawing. Build dashboards and interactive CLIs without leaving your language.
GPU Compute
CPU-backed GPU compute buffers with matmul, axpy, dot, reduce, and map. Same API, zero driver hassle.
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 287 tests including a dedicated security suite.
See it in action
From neural networks to raw memory — all in the same syntax.
import "serez-ai"
Random.seed(42)
let model = new Sequential()
model.add(new Dense(2, 32, "relu"))
model.add(new Dense(32, 1, "sigmoid"))
Autodiff.tape()
let pred = model.forward(X)
let loss = new BCE().forward(pred, y)
Autodiff.backward(loss)
let opt = new Adam(0.01, 0.9, 0.999)
model.layers.forEach((layer) => {
layer = opt.step_layer(layer)
})Official packages
Neural networks, autodiff, and training loops. Dense, Conv2D, LSTM, Attention, BatchNorm, Dropout, Adam/SGD/Momentum. Keras-like API.
Retained-mode terminal UI library. Text, Box, VStack, HStack, Separator, Spacer. Unicode box-drawing. Zero ANSI dependencies.