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

ModulePurpose
stringsSearch, slice, split, join, case, padding, formatting, builder
regexRegular expressions: match, find, replace, capture groups
typesRuntime type checks and conversions
jsonParse, query, edit, and stream JSON
yamlParse and serialize YAML
xmlValidate, query, and convert XML
urlParse and build URLs and query strings
encodebase64, hex, CSV, binary, JSON/XML
serializemsgpack and protobuf
compressgzip, zlib, lz4, brotli

Math & collections

ModulePurpose
mathArithmetic, trig, logs, random, bitwise, interpolation
collectionsStack, queue, set, map, heap, trie, ring, list, tuple

Time

ModulePurpose
timeClock, dates, timers, durations, formatting
dateConvenience date API over Unix timestamps
timersetTimeout, setInterval, clear

System & I/O

ModulePurpose
ioFiles, streams, and path helpers
osEnvironment, process, signals, permissions
execRun shell commands and programs
signalPOSIX signal handlers
terminalRaw mode, key input, ANSI colors and cursor
runtimeIntrospection and a process-global shared store
memoryByte buffers, interning pools, GC stats
loggingLeveled logging with a debug toggle

Networking

ModulePurpose
netTCP, UDP, TLS, DNS, and an HTTP client
httpHTTP client (the built-in server is in HTTP server)

Crypto & data stores

ModulePurpose
cryptoHashing, HMAC, AES, RSA, Ed25519, random, certs, TLS
redisRedis client — key/value, lists, hashes, pub/sub
sqlSQLite, Postgres, and MySQL
mongoMongoDB 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.

Standard library · View as Markdown · llms-full.txt