Skip to main content

Standard Library Overview

Everything lives under the global std object. The namespace is flat: std.string, std.sort, std.math, and so on are direct members of std (there is no std.algo or std.os nesting). All of it is restricted (read-only) — scripts can call it but never modify it.

std.math.abs(-42)
std.string.upper("hi")
std.file.read("a.txt")

The std surface

Module / functionPurpose
std.stringString manipulation
std.sortArray algorithms (map, filter, sort, ...)
std.seqSequence helpers (range, chunk, take, drop, sets)
std.mathMath functions and constants
std.convertNumber/string/base conversion, format
std.hashmd5, sha256, crc32
std.cryptoAES encrypt/decrypt, file crypto, random bytes (OpenSSL)
std.jsonparse / stringify
std.compressionzstd / lz4 compress & decompress (optional at build)
std.imagePNG / JPEG / BMP load, save, convert
std.uuiduuid4()
std.assertassert, assert_eq, assert_ne, assert_throws
std.fileFile read/write, list, glob, temp, ...
std.pathPath resolution and decomposition
std.envEnvironment variables, args
std.timeTime, timers, calendars, unit conversion
std.asyncspawn, await, sleep, defer, race
std.netTCP / UDP / HTTP / WebSocket, DNS, URLs

Some shortcuts are regular callable functions on std, not module objects (see std.os).

Colon is never used to call module or member functions — use dot (std.string.upper(...), ops.add(...)). Colon is only for pipes acting on a value.

Module pages

Algorithm

System

Concurrency

Network