Standard Library Overview
Standard Library Overview
Everything lives under the global std object. The namespace is flat:
std.string, std.sort, std.math are direct members of std (no
std.algo or std.os nesting); a few OS helpers sit directly on std too
(see std.os). All of it is restricted (read-only). Call everything
with dot — colon is only for pipes on values (see
Pipes).
Module pages
Algorithm
- std.string — string manipulation
- std.sort — array algorithms
- std.seq — sequence helpers (range, chunk, sets)
- std.math — math functions and constants
- std.convert — number/base conversion
- std.hash —
md5/sha256/crc32 - std.crypto — AES and random bytes (OpenSSL)
- std.json —
parse/stringify - std.compression — zstd/lz4
- std.image — PNG/JPEG/BMP
System
- std.file — file read/write, list, glob, temp
- std.path — path resolution and decomposition
- std.env — environment variables,
args - std.os —
system/exit/chdir/pid/arg_parserdirectly onstd - std.time — time, timers, calendars
- std.uuid —
uuid4()/uuid7()/uuid3()/uuid5(), validation, byte conversion - std.assert —
assert/assert_eq/assert_ne/assert_throws - std.dbus — D-Bus calls and signals (optional at build)
- std.pw — PipeWire audio devices, volume, defaults (optional at build)
- std.pa — PulseAudio audio devices, volume, defaults (optional at build)
Concurrency
- Overview — fibers, yield points, mental model
- Spawn & Await — futures and overlapping work
- Primitives: Sleep · Defer · Race
- Patterns — fan-out, parallel HTTP, keep-alive
- Errors —
awaitvslast_error()
Network
- TCP —
tcp_client/tcp_server - UDP —
udpdatagrams - HTTP Client —
http_client - HTTP Server —
http_server+ routes - WebSocket —
websocket - URL —
parse_url - DNS —
dns_lookup - HTTP Codes —
http_codesconstants - Overview: std.net