Standard library
Find the namespace for a task.
On this page
Import a namespace with use valk.name. Core types such as String, Array, Map and ByteBuffer need no import.
| Namespace | For | Guide |
|---|---|---|
core |
Built-in types: strings, numbers, arrays, maps, sets, arenas | Strings, Arrays, Maps, More collections |
ansi |
Colors and styles in terminal output | Terminal output |
compress |
gzip, zlib and DEFLATE | Compression |
coro |
Coroutine helpers; co and await need no import |
Coroutines |
crypto |
Hashes, passwords, HMAC, ciphers, signatures, random bytes | Cryptography |
fs |
Read, write and stream files; paths and directories | Files & streams, Paths & directories |
gc |
Memory usage and releasing memory to the OS | Copies & references |
html |
Escape text for HTML and check URLs in attributes | Markdown & HTML |
http |
HTTP server and client, WebSockets | HTTP server, HTTP client, WebSockets |
io |
Reader and Writer interfaces shared by files, sockets and buffers |
Files & streams |
json |
Decode, inspect and encode JSON | JSON |
log |
Log messages with levels and fields | Logging |
markdown |
Markdown to HTML | Markdown & HTML |
math |
Floating point functions: roots, powers, trigonometry, rounding | API reference |
mem |
Manual memory and raw byte operations | Unsafe code |
net |
TCP and UDP sockets | TCP & UDP |
random |
Random numbers, choices and shuffles | Random numbers |
regex |
Regular expressions | Regular expressions |
signal |
React to Ctrl+C and other OS signals | Signals |
sync |
Channels, cancel tokens, select, tickers | Channels & cancellation |
template |
HTML and text templates | Templates |
thread |
OS threads and parallel loops | Threads |
time |
Dates, time zones, formatting, clocks and sleeping | Dates & time |
url |
Parse, build and encode URLs and query strings | URLs |
validate |
Check user input against rules | Validation |
ext |
OS and C library bindings the standard library is built on | C interop |
Look up the full API#
valk doc prints the documentation of any namespace or declaration:
Terminal
valk doc http.Server
valk doc String.split
The API reference lists every public declaration. See Documentation comments for more on valk doc.

