Standard library
Langoost ships with a large standard library. Import any module by name with
import modulename, then call functions with dot syntax. Each module below has
its own reference page.
Built-in functions
Always in scope, no import required:
print, println, len, toString, toInt, toFloat, range, typeof,
append, read, exit.
Text & data
| Module | Purpose |
|---|
| strings | Search, slice, split, join, case, padding, formatting, builder |
| regex | Regular expressions: match, find, replace, capture groups |
| types | Runtime type checks and conversions |
| json | Parse, query, edit, and stream JSON |
| yaml | Parse and serialize YAML |
| xml | Validate, query, and convert XML |
| url | Parse and build URLs and query strings |
| encode | base64, hex, CSV, binary, JSON/XML (submodules) |
| encoding | flat base64 / base32 / hex helpers |
| serialize | msgpack and protobuf |
| proto | Protocol Buffers — wire format and .proto schemas |
| compress | gzip, zlib, lz4, brotli |
Math & collections
| Module | Purpose |
|---|
| math | Arithmetic, trig, logs, random, bitwise, interpolation |
| collections | Stack, queue, set, map, heap, trie, ring, list, tuple |
Time
| Module | Purpose |
|---|
| time | Clock, dates, timers, durations, formatting |
| date | Convenience date API over Unix timestamps |
| timer | setTimeout, setInterval, clear |
System & I/O
| Module | Purpose |
|---|
| io | Files, streams, and path helpers |
| os | Environment, process, signals, permissions |
| exec | Run shell commands and programs |
| signal | POSIX signal handlers |
| terminal | Raw mode, key input, ANSI colors and cursor |
| runtime | Introspection and a process-global shared store |
| memory | Byte buffers, interning pools, GC stats |
| logging | Leveled logging with a debug toggle |
| Module | Purpose |
|---|
| image | Image processing — resize, crop, rotate, filters (PNG/JPEG/GIF/TIFF/BMP) |
| ffmpeg | Transcode and probe media via system ffmpeg/ffprobe |
Networking
| Module | Purpose |
|---|
| net | TCP, UDP, TLS, DNS, and an HTTP client |
| http | HTTP client (the built-in server is in HTTP server) |
| http2 | HTTP/2 server — TLS h2 and cleartext h2c |
| form | Parse URL-encoded and multipart form bodies |
| stun | STUN client and BIND server (NAT discovery) |
| turn | TURN relay server |
| webrtc | WebRTC peer connections and data channels |
| tun | TUN virtual network interface (raw IP packets) |
Hardware
| Module | Purpose |
|---|
| gpio | GPIO pins, hardware PWM, I²C, and SPI (Raspberry Pi and similar) |
Crypto & data stores
| Module | Purpose |
|---|
| crypto | Hashing, HMAC, AES, RSA, Ed25519, X25519, HKDF, random, certs, TLS |
| redis | Redis client — key/value, lists, hashes, pub/sub |
| sql | SQLite, Postgres, and MySQL |
| mongo | MongoDB client — insert, find, update, delete, count |
| raft | Raft consensus node (replicated log) |
Testing
The assert module (eq, ne, ok, throws) pairs with the built-in test
runner — see the testing guide.
Concurrency
| Module | Purpose |
|---|
| thread | Goroutines, pools, futures, channels, mutexes, RW locks, semaphores, atomics |
The concurrency guide is a tutorial-style walkthrough of
the same module. Shared state across tasks lives in runtime.core — see the
runtime module.