Standard Library
The standard library ships with the compiler under the std namespace. Import any
of it with use:
use std.strings
use std.net.http
use std.data.encoding::(json)
Per-module API reference is being generated - the pages below are placeholders for now.
Core
std.strings
Text manipulation, searching, and formatting. Reference coming soon.
std.bytes
Byte buffers and readers. Reference coming soon.
std.math
Numeric functions plus std.math.geom for geometry types. Reference coming soon.
std.time
Clocks, durations, formatting, and cron expressions. Time.equals compares the wall
clock only; since measures on the monotonic clock when both times carry one (both
came from now()), otherwise on the wall clock. Reference coming soon.
std.errors
Error construction, wrapping, and inspection. Reference coming soon.
std.data.collections
Sequences (List, LinkedList, DoublyLinkedList, Deque,
Queue, Stack, RingBuffer), bit sets, hash and ordered maps
(HashMap, SortedMap, OrderedMap, MultiMap), sets,
heaps and priority queues, trees (BinaryTree, BST, AVLTree,
RedBlackTree, BTree, BPlusTree, Trie,
RadixTree), graphs with Dijkstra, sparse arrays, a Bloom filter and an LRU cache.
Doubly linked structures keep their back pointers weak, so dropping a list frees its nodes.
Reference coming soon.
std.data.semver
Semver: parse, the version parts, precedence comparison against a
version or a string, and satisfies(range) with ||, operators,
~, ^, wildcards and hyphen ranges. Reference coming soon.
std.i18n
Locales, languages, regions, currencies, time zones, number and date formats, plural categories. Reference coming soon.
std.validations
Input validation helpers and validating parameter annotations. Reference coming soon.
System
std.os
Filesystem, paths, processes, and environment. Reference coming soon. run(command, input) and output(command) start a program through Runtime.run and need adm.runtime.spawn.
std.io
Reader, Writer, Closer and their combinations - interfaces
only, implemented by the types that own the data (std.bytes.Buffer,
std.os.File). read(buf) may return fewer bytes than asked; at the end of
the stream it returns 0 for a non-empty buffer, without an error, on every call from
then on. readFull loops until the buffer is full and fails if the stream ends first.
Reference coming soon.
std.mem
Low-level memory operations. Reference coming soon.
std.sync
Synchronization primitives beyond channels. Reference coming soon.
std.services
Service manager plus the builtin services - Application, Cache,
Config, Diagnostics, Logging, Network,
Runtime, Scheduler, Storage, UI and the
rest. See the services reference for every method signature and
the annotations each service ships.
Data
std.data
Encoding (JSON, XML, YAML, MsgPack, Base64, plus urlEncode/urlDecode
percent encoding and htmlEncode/htmlDecode character references in
std.data.encoding), compression, databases, and data structures. Reference coming soon.
std.crypto
Hashes, ciphers, random, and UUIDs. Reference coming soon.
std.formats
Image, audio, video, font, archive, and document formats. Reference coming soon.
std.proto
Wire protocols. dbus.adm (Linux) speaks D-Bus: the message format (DBusWriter, DBusMessage), the SASL handshake and a DBusConnection to the session bus (dbusConnect, call, callSync, subscribe). Notifications is built on it.
Networking
std.net
TCP, UDP, DNS, and higher-level protocol clients and servers - HTTP, SSH, SMTP, FTP, LDAP, IRC. Reference coming soon.
Graphics & UI
std.ui
Components and renderers backing the UI constructs. Reference coming soon.
std.gfx
Canvas drawing, color, and rendering. Reference coming soon.
std.simd
Documented surface over the vector types - loads, stores, and lane operations. Reference coming soon.
std.gpu
DeviceBuffer<T>, memory that stays on the GPU between cuda def
launches (upload, download, write, dispose),
plus available() and deviceName(). See
GPU kernels in the reference. Reference coming soon.
Tooling
std.testing
Lifecycle hooks and attributes for check suites. Reference coming soon.
std.reflection
Meta contexts, runtime type info, and discovery - the machinery behind attributes. Reference coming soon.
std.ide
Live service information for a connected IDE: the @ide annotation publishes a
service method as a value, table, series, tree or text panel, refreshed on a schedule.
Dormant unless the launcher sets ADM_IDE_PORT. Reference coming soon.
std.cli
Argument parsing, flags, and terminal output. Reference coming soon.
std.metrics
Counters, gauges, and metric publishing. Reference coming soon.
std.interop
Helpers for foreign function interfaces. Reference coming soon.