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 |
| serialize | msgpack and protobuf |
| 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 |
Networking
| Module | Purpose |
|---|
| net | TCP, UDP, TLS, DNS, and an HTTP client |
| http | HTTP client (the built-in server is in HTTP server) |
Crypto & data stores
| Module | Purpose |
|---|
| crypto | Hashing, HMAC, AES, RSA, Ed25519, 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 |
Concurrency
The thread module (goroutines, channels, mutexes, futures, and more) is
covered on the concurrency page. Shared state across
tasks lives in runtime.core — see the runtime module.