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)
Core
std.strings
format | C-style formatting (%d, %s, %x, …) |
Scanner | cursor over text for hand-written parsers |
similarity, SimilarityAlgorithm | Levenshtein, Dice, Hamming, Jaro and Jaro-Winkler similarity |
Most string operations are methods on string in the prelude.
std.text.unicode
category, Category, combiningClass, script | Unicode 18 character properties |
displayWidth | the columns a character or a text takes in fixed-pitch layout: 2 for East Asian wide characters, 0 for combining marks; in a text an emoji made of several characters counts once |
normalize, NormalForm, decompose, compose | normalization (NFC, NFD, NFKC, NFKD) |
mirror, isDefaultIgnorable, isExtendedPictographic | bidi mirroring, ignorables, emoji |
lineBreaks, LineBreak | line break opportunities (UAX #14) |
toLower, toUpper, toTitle, caseFold | Unicode case mapping and folding, full mappings, final sigma |
isCased, isCaseIgnorable, isNoncharacter, codePoints | casing properties, noncharacters, a text as code points |
decompositionType, joiningType, hangulSyllableType | decomposition tags, cursive joining, Hangul syllable types |
std.text.precis
enforce, prepare, compare, Profile | PRECIS (RFC 8264): usernames, opaque strings (passwords) and nicknames (RFC 8265, RFC 8266) |
derivedProperty, allowed, StringClass, bidiRule | the derived property of a code point, the string classes, the Bidi Rule |
PrecisError | errors |
std.text.idna
toASCII, toUnicode, IDNAOptions | internationalized domain names: UTS #46 processing (Unicode 18), IDNA2008 rules when strict |
derivedProperty, DerivedProperty, allowedInContext, bidiRule | IDNA2008's derived property of a code point, its contextual rules, the Bidi Rule (RFC 5892, RFC 5893) |
punycodeEncode, punycodeDecode | Punycode (RFC 3492) |
IDNAError | errors, with the UTS #46 code |
std.text.templates.jinja
parse, Template, Options | Jinja2 templates |
Safe | text marked safe from autoescape |
std.adm.lexer
tokenize | every token of ADM source, ending with EOF; comments optional, white space on request |
Lexer | next() one token at a time; scan() its kind and span without the text, allocating nothing |
Token | kind, character offsets start/end, text (identifiers in NFC) |
TokenKind | token classes; the value of a punctuation, operator or keyword member is its spelling |
isLiteral, isPunctuation, isOperator, isKeyword | classify a kind |
std.adm.syntax
parse | the lossless syntax tree of ADM source; never fails, diagnostics for what the grammar refused |
SyntaxTree, SyntaxNode | navigation by offset, children, siblings, ancestors; edit() reparses one block and shares the rest; dump() |
Green, greenTokens | the immutable, position-free elements with their trivia |
SyntaxKind, TriviaKind, Trivia, Diagnostic | kinds, trivia pieces and parse diagnostics |
std.adm.symbols
analyze, FileSymbols | the declarations, scopes and imports of a file; what a name means at an offset |
Symbol, SymbolKind | a declaration: kind, qualified path, name span, doc comment, annotations, members, stable id, whether it is a meta def |
Scope, ScopeKind | the scope tree with lookup by offset |
Workspace | many files: a module's parts, resolution through parts and imports, ids kept across edits; register parses a file on first use, loadAll in the background, moduleSymbols names every module from the file headers alone; resolveCallable is what a called name calls past a value of that name; filesNaming the files a declaration's name may stand in |
Navigator | definition, completions, type of an expression, signature, usages and rename edits from declared types; struct literal keys, named arguments and loop variables resolved; at an annotation, the metas that can annotate the declaration it stands on; in a style body, the properties of the styles it embeds; at a value, what fits its type (insertText spells an enum member); where a declaration starts, only the keywords and modifiers that may follow what is written (SymbolKind.Keyword rows), and types after a field's name |
Doc, DocExample, DocTag, DocTagInfo, parseDoc, groupTags, tagLabel, docTags | a doc comment taken apart: description, example fences, trailing @tags; the tags with a meaning (@author, @see, @since, @deprecated, @param name text) |
Hover | what an editor shows for a symbol: signature, module, value type, parsed doc |
isImplementerKind | with Navigator.satisfies, contracts and implementers: implicit implementation of interfaces and datatypes, both directions |
Classified, TokenClass | semantic classes of every name token from Navigator.classify, for colouring and the x-ray view |
NameProblem, NameProblemKind, UnresolvedName | diagnostics over names from Navigator.nameProblems: unresolved names, unknown members, struct keys and named arguments where the type is known |
Type, TypeKind | a type as the editor knows it, made once per workspace: primitives, named types with their arguments, type parameters, ?T, !T, async T, arrays, maps, channels, SIMD vectors and masks, matrices, functions, tuples, unions, intersections, and unknown for what cannot be told; Navigator.typeAt gives the type at an offset |
InlayHint, InlayHintKind | what Navigator.inlayHints shows over a range: the inferred type after a name declared without one, the parameter's name before a literal argument |
SignatureHelp, SignatureInfo, ParameterInfo | what Navigator.signatureHelp shows inside a call's parentheses: every overload, constructor or component's inputs, each parameter's type, default and @param text, the parameter being written and the overload the arguments choose |
UsageCount | how many places across the workspace name each declaration of a file, from Navigator.usageCounts, answered from per-file indexes without loading the whole workspace |
DeclaredName | a top-level declaration from Workspace.declaredNames(kind), known without parsing its file: name, kind, module, file and whether it is internal |
ImportCompletion | a completion from Navigator.importCompletions for a name or module the file does not import yet: the text to write and the edit that adds the use, merged into the file's imports |
TypeProblem | a type error from Navigator.typeProblems over a range, with the compiler's code and message: a value of another type in a typed let, an assignment, a return or a struct field, a call no overload takes, named arguments that do not fit, a value called that is no function, a dropped !T result; only what is certain is reported |
TypeRef | a type as written: its node, its file, and the type arguments its type parameters stand for through a member chain |
docText, trailingDocText | the doc comment rule |
std.glob
glob, Glob | shell-style patterns (*, ?) |
std.bytes
Buffer | growable byte buffer, read and written |
Reader | reader over a byte array |
BinaryReader | typed reads in either byte order, varints |
Bitstream | bit-level reader |
RecordReader, RewindableReader | record and rewindable readers |
Pipe | in-memory stream between two tasks |
Endian, Whence | byte order, seek origin |
std.math
sqrt, sin, cos, atan2, ln, log2, log10, … | numeric functions |
approx | float comparison with a tolerance |
erf, erfc | error function and its complement |
Decimal, parseDecimal, RoundingMode | exact decimal numbers |
Random | seeded random numbers of any numeric type: of<T>, range, normal |
Other operations are methods on the numeric types; exponentiation is **.
std.math.geom
Point, Vec2, Vec3, Size, Rect, Rectangle | points, vectors, sizes, rectangles |
Circle, Line, Ray, Polygon | shapes |
Edges, Corners, Axes | per-side, per-corner and per-axis values |
Transform2D | 2D affine transform |
Quaternion | 3D rotation: axis-angle, matrix, slerp, Euler angles |
Path, FillRule, StrokeStyle, LineCap, LineJoin | paths: build, stroke, dash, measure, trim, morph, boolean operations |
BezierPath, QuadraticBezier, CubicBezier | curves |
std.math.geo
Coordinate, DistanceMethod, earthRadius | positions on WGS84; geodesic and haversine distance, bearing, destination, interpolation |
Bounds | latitude and longitude boxes, across the antimeridian too |
Geometry, GeometryKind | points, lines, polygons and collections: area, length, centroid, point in polygon, simplification |
Feature, FeatureCollection, parseGeoJSON, parseGeoJSONGeometry | GeoJSON (RFC 7946) |
parseWKT, parseEWKT, parseWKB, parseEWKB | WKT and WKB, PostGIS extended forms |
parseGeohash, geohashNeighbors | geohash cells |
Tile, parseQuadkey, toWebMercator, fromWebMercator, maxMercatorLatitude | map tiles, quadkeys, Web Mercator |
UTM, parseUTM | Universal Transverse Mercator grid |
std.math.bezier
linear, quadratic, cubic | Bézier curve evaluation and derivatives |
cubicParameter | solver behind CSS cubic-bezier |
std.math.easing
Easing | easing function type |
easeInQuad … easeInOutBounce | the easings.net curves |
cubicBezier, steps | CSS timing functions |
spring | damped spring |
std.math.processing
fft, ifft, rfft, irfft | Fourier transforms of any length |
Fourier | a transform planned once and run on many inputs of one length |
dct, idct | cosine transforms (DCT-II/III) |
std.math.ecc
Field, BinaryField, PrimeField | finite fields: GF(2^m), GF(p) |
ReedSolomon | Reed-Solomon: encode, correct with errors and erasures |
std.math.linalg
solve, leastSquares, inverse, pseudoInverse, determinant | linear systems on matrix<float> |
lu, cholesky, qr, svd, eigen, eigenSymmetric | decompositions (LU, Cholesky, QR, SVD, Eigen, SymmetricEigen) |
norm, Norm, rank, condition, trace | measures of a matrix |
zeros, identity, diagonal | builders |
LinalgError, LinalgErrorKind | why an operation failed: shape, singular, no convergence |
std.math.stats
mean, median, quantile, mode, variance, deviation, skewness, kurtosis, sum, min, max | descriptive statistics of a float[] |
covariance, correlation, rankCorrelation, linearRegression, Regression | two samples |
covarianceMatrix, correlationMatrix | many variables in a matrix |
zscores, ranks, histogram, Histogram | transforms and counts |
Normal, Summary | the normal distribution; running statistics of a stream |
std.units
Length, Mass, Time, Temperature, Angle, DataSize, … | base dimensions |
Speed, Force, Energy, Voltage, DataRate, … | derived dimensions |
Pixels, Percent, ViewportHeight, ViewportWidth, FontRelative, Extent | layout dimensions (UI extents) |
parseUnit | quantity from text |
quantity | quantity from a number |
Used by quantity literals; the catalogue lists every unit.
std.time
Time | point in time on the wall and monotonic clocks |
now, since, sleep | clock |
parse, parseDuration | RFC 3339 times, durations |
Month, Weekday | calendar fields |
Date, TimeOfDay, DateTime, parseDate, parseDateTime | civil dates and times without a zone |
Cron, parseCron | cron expressions |
formatHTTPDate, parseHTTPDate | HTTP dates |
formatMailDate, parseMailDate | RFC 5322 mail dates |
std.errors
StackTrace, StackFrame, Location | stack traces |
printStackTrace | prints the current stack |
std.data.collections
List, LinkedList, DoublyLinkedList, Deque, Queue, Stack, RingBuffer | sequences |
HashMap, SortedMap, OrderedMap, MultiMap, LRUCache | maps |
Set, HashSet, SortedSet, OrderedSet, MultiSet, DisjointSet | sets |
Heap, MinHeap, MaxHeap, PriorityQueue | heaps |
BinaryTree, BinarySearchTree, AVLTree, RedBlackTree, BTree, BPlusTree, Trie, RadixTree | trees |
Graph, DirectedGraph, WeightedGraph | graphs |
BitArray, BitSet, BloomFilter | bits |
SparseArray, SparseSet, SparseMatrix | sparse storage |
sort, Comparable, SortMethod | std.data.collections.sort |
search, SearchMethod | std.data.collections.search |
std.data.db
connect, drivers | open a SQL database by URL with the driver linked for its scheme; drivers are the libraries adm.database.sqlite, adm.database.postgres, adm.database.mysql |
Connection, Transaction, Queryable | exec, query, prepare with positional or named arguments; beginTx, commitTx, rollbackTx |
pool, Pool | a connection shared between tasks: up to limit real connections, one lent per statement, result, transaction or prepared statement |
Statement, Rows, Column, Result | prepared statements; rows read one at a time with typed readers |
read, readAll, values, @column, Stored | rows to objects and objects to arguments |
positional, placeholders, Placeholder | :name placeholders rewritten for a database that binds by position |
@connection, sqlExec, sqlOne, sqlOptional, sqlAll, sqlRow, sqlOptionalRow, sqlRows, sqlCell, sqlOptionalCell, sqlBound, sqlDefault, sqlNamed, provide | what a sql def compiles to, and where one without a @connection finds its connection |
Driver, @driver, Isolation | what a driver library implements and registers |
isolate | inside a transaction block: the isolation level and read-only mode of the database transactions the block begins after the call |
sqlScript, sqlRoutineCall, routineKindOf, @routine, routines, Routine, RoutineKind, RoutineValue | sql def scripts and stored routines: what they compile to, and the routines a program declares |
@sqlschema | check a type's sql def statements against a schema file when the program is built |
Dialect, dialectOf | what a driver adds for stored routines, the migration lock and its quoting |
lockMigrations, unlockMigrations, installRoutine, readVersion, writeVersion | what the Database service migrates a database with |
DbError, ErrorKind, errorOf | failures with their kind, SQLSTATE and the database's error number |
std.data.semver
Semver | semantic version; precedence and satisfies(range) |
parse, compare, isRange | parsing, comparison, and whether a range parses |
std.i18n
Locale, parseLocale, negotiate, parseAcceptLanguage | locales (BCP 47) and negotiation |
Language, Region, Script, Currency | display names and data from CLDR |
NumberFormat, NumberOptions | numbers, percentages, currencies, units, compact notation |
DateTimeFormat, DateTimeOptions | ECMA-402 date and time formatting, every calendar |
TimeZone, ZonedDateTime, parseTimeZone, systemTimeZone | time zones from the tz database |
Calendar, CalendarDate | Gregorian, Hebrew, Islamic, Chinese, Japanese and other calendars |
pluralCategory, pluralRange, PluralCategory | plural rules |
Message, parseMessage, MessageError, MessagePart | translated text with places for values, in the ICU MessageFormat syntax: plurals, select, numbers, dates |
Catalog, CatalogEntry, CatalogHeader | the messages of one language, with contexts and gettext plural forms |
translate | @translate: a field whose reads return translated text |
SpellOut | numbers in words |
std.validations
isEmail, isURL, isIP, isUUID, isJSON, isXML, isBase64, isUTF8, … | text checks |
luhnCheck | card number checksum |
System
std.os
File | open file |
readFile, writeFile, open, stat, readDir, exists, remove, rename, mkdir, rmdir, chmod, touch | file operations |
join, dir, base, extension, split, clean, isAbs, absolute | paths, in the system's form (on Windows with drives and shares, \ and /) |
run, output | start a program (needs adm.runtime.spawn) |
Process, Pipe | a program started by Runtime.start that runs beside this one: input, output and errors pipes (io.Reader/io.Writer), wait(), wait(timeout), terminate(), kill(), id() |
mapFile, Mapping | memory-mapped files: read copies a range, pages is an array over the mapping's own pages (no copy; a file larger than memory) |
File.sync, File.lock, File.unlock | push writes to the device, advisory whole-file locks |
memoryFile, File.seal | a file with no path that lives in memory (Linux); making its content final before handing it to another process |
symlink, freeSpace, totalSpace, unixMode, fromUnixMode | links, disk space, Unix mode bits |
watch, Watcher, Change, ChangeKind | changes to files and directories |
appHome | the application's own folder |
tempDir, tempFile | the folder for temporary files (TMPDIR or /tmp, %TMP% on Windows); a new file there, or in a folder given, with a name no one else has, open for reading and writing |
homeDir, resolve | the user's home folder; the absolute, shortest form of a path, where ~ is that folder and a relative path starts at the working directory |
std.io
Reader, Writer, Closer, Aborter | stream interfaces, and their combinations |
readFull, readAll, copy | stream helpers |
Interfaces only; the types that own the data implement them.
std.fs
FileStore | file tree interface |
DiskStore | the disk, optionally confined to a folder |
MemoryStore | file tree in memory |
copy | file or tree between any two stores |
cleanPath | a store path in its shortest / form, on every system |
FileEntry, FileKind | listing entries |
std.mem
copy, move, set, zero, copyN, moveN, setN, set32 | raw memory |
std.sync
Mutex, ReadWriteLock | locks a task may hold across calls that wait |
Semaphore | a number of permits, to bound how many tasks run something at once |
WaitGroup, Once | wait for work to end; run a function one time |
std.services
Application, ServiceStatus, StartMode, RestartMode, Lifecycle, Dependencies, ServiceInfo, ServiceStatusChange | the application service and the types every service shares |
Storage, Config, Logging, Cache, Scheduler, Messaging, Telemetry, Runtime, Network, Diagnostics, Policy, Notifications, Clipboard, Browser, … | builtin services, each in its own module std.services.<name> (use std.services.cache::(Cache)) |
std.services.browser: Browser, BrowserInfo, PageMetadata, Cookie, SameSite, PermissionState, BrowserError, BrowserFailure, browserFailure | the page of a web build: address and history, metadata, cookies, storage, permissions, installing, the service worker |
Every method and annotation: services reference.
std.proto
DBusConnection, dbusConnect, dbusSessionBusAddress, dbusSystemBusAddress | D-Bus client for the session and system buses (Linux) |
DBusMessage, DBusWriter, DBusReader | D-Bus wire format: a writer that aligns each type, with dictionary entries (dictString, dictBool, dictBytes, beginEntry) and nested arrays and structs (beginArray/endArray, beginStruct); a reader that walks a body by signature |
std.proto.jsonrpc
Peer, Framing | JSON-RPC 2.0 over a byte stream, both directions |
Dispatcher | server methods, also an HTTP handler |
HttpClient | calls over HTTP POST |
Request, Handler, Call, Reply | requests, handlers, batches |
RPCError, ErrorCode, errorOf, kindOf | error objects |
NoReply | the failure of a handler that must not be answered |
std.proto.msgpackrpc
Peer | MessagePack-RPC over a byte stream, both directions |
Request, Handler | requests and handlers |
RPCError, ErrorCode, errorOf | error objects |
std.proto.mcp
@mcp.tool, @mcp.resource, @mcp.prompt | make a function or a method a tool, a resource or a prompt of an MCP server |
serve | serves every marked function over standard input and output |
Server | an MCP server: registration in code, discover, add, stdio, streams and HTTP |
Request | what a handler gets: progress, log messages, cancellation, questions to the client, the access token and require for scopes |
Client, connect, launch | an MCP client over a stream or HTTP, or of a server it starts as a program |
Authorization, CredentialStore | a client's way into a server that asks for an access token: discovery, registration, the code flow, refresh, more scopes on demand |
Tool, ToolResult, ToolHints, ToolHandler | tools |
Task, TaskStatus, TaskSupport, ToolRun | tasks: tool calls a server carries on after it answered (@mcp.tool(task = …); Client.start, wait, task, cancelTask) |
Resource, ResourceTemplate, ResourceContents, ResourceHandler | resources |
Prompt, PromptArgument, PromptMessage, PromptResult, PromptHandler | prompt templates |
Content, ContentKind, text, image, audio, embedded, link, Annotations, Role | content of results and messages |
Completion, CompletionHandler, Reference | completion of arguments |
Elicitation, ElicitAction, ElicitationRequest, SamplingRequest, SamplingMessage, SamplingResult, ModelPreferences, Root | what a server asks of its client |
Implementation, Icon, ClientCapabilities, ServerCapabilities, LogLevel, ProgressHandler | identity, capabilities, logging, progress |
McpError, McpErrorKind | why a call or a transport failed |
Speaks protocol revisions 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05, over a stream of lines (standard input and output) and over HTTP. Server.protect(guard, scopes) puts an oauth2.ResourceServer in front of the HTTP endpoint.
std.proto.journald
Client, Entry, Field, Priority | systemd journal, native protocol |
parse, fieldName, validName, defaultSocket | reading an entry, making and checking field names, the journal's socket |
Encoder | log encoder for the Logging service |
JournalError, JournalErrorKind | why an entry was not encoded, read or sent |
std.proto.auth.jose
Jws, sign, parseJws | JSON Web Signature, compact and JSON |
Jwe, encrypt, parseJwe | JSON Web Encryption, one or several recipients |
Jwk, JwkSet, parseKey, parseKeySet, generateKey | JSON Web Keys |
RemoteKeySet | key set fetched from a jwks_uri, with rotation |
Claims, Validation, verifyJwt, parseClaims | JWT with RFC 8725 checks |
SignatureAlgorithm, KeyAlgorithm, ContentEncryption | every JOSE algorithm |
std.proto.auth.oauth2
Client, Token, AuthorizationRequest, DeviceAuthorization | OAuth 2 client: code with PKCE, client credentials, refresh, device flow, token exchange, DPoP |
AuthorizationServer, ClientStore, GrantStore | authorization server |
ResourceServer, AccessToken, Introspection | resource server: JWT and introspected tokens, challenges that name scopes and metadata |
ResourceMetadata, discoverResource, parseResourceMetadata | protected resource metadata (RFC 9728): what a resource publishes, and how a client finds its authorization server |
ServerMetadata, discover, ClientRegistration | metadata discovery, dynamic client registration |
ClientMetadata, ClientDocuments | client metadata; Client ID Metadata Documents: a client's own URL as its id, rendered by the client and fetched by the server |
parseToken, parseMetadata | reading a kept token and a metadata document |
std.proto.auth.openid
RelyingParty, connect, Login, IdClaims | OpenID Connect relying party |
Profile, SignInProvider | who signed in, the same for every provider; the interface the adm.auth sign-in libraries implement |
Provider, UserStore | OpenID Connect provider |
ProviderMetadata, discover | provider discovery |
LogoutEvent | RP-initiated, front- and back-channel logout |
std.proto.auth.saml
ServiceProvider, LoginOptions, Assertion, Logout | SAML 2.0 service provider: Web SSO and Single Logout |
IdentityProvider, PendingLogin, Decision, ServiceProviderStore, MemoryServiceProviderStore | identity provider |
EntityDescriptor, IdpDescriptor, SpDescriptor, KeyDescriptor, Endpoint, parseMetadata, parseMetadataSet, writeMetadataSet | metadata, signed or not |
Binding | Redirect, POST, Artifact and SOAP bindings |
NameId, NameIdFormat, Attribute, Attributes | name identifiers and attributes |
SamlError, SamlErrorKind, StatusCode | errors and status codes |
std.proto.auth.otp
HOTP, TOTP | one-time passwords, RFC 4226 and RFC 6238 |
KeyURI, parseKeyURI | otpauth:// URIs for authenticator apps |
generateSecret, parseSecret | Base32 secrets |
std.proto.auth.webauthn
RelyingParty, RegistrationOptions, AuthenticationOptions, Credential | WebAuthn relying party: registration and sign-in |
verifyAttestation, AttestationResult | attestation: packed, TPM, Android key, SafetyNet, FIDO U2F, Apple, compound |
Client, parseRegistrationOptions, parseAuthenticationOptions | the browser's part, for native apps |
SecurityKey, HIDTransport, securityKeys | FIDO2 security keys over USB: CTAP 2.2 and U2F, PIN, credential management, large blobs, fingerprints |
SoftDevice, SoftAuthenticator | authenticators in software |
COSEKey, parseCOSEKey, AuthenticatorData | COSE keys, authenticator data |
Extensions: credProps, prf, largeBlob, credProtect, credBlob, minPinLength, appid, appidExclude. USB on Linux only for now.
Data
std.data.encoding
JSON, json | JSON: encode, decode into objects, map<string, any>, any[] and typed arrays (User[] from a top-level array), parse into plain values |
XMLNode, XMLWriter, XML | XML objects (encode, decode, @xml), tree, writer and well-formedness check |
YAML, YAMLError | YAML 1.2: parse and parseAll into plain values, decode into objects and typed arrays (User[] from a top-level sequence), encode; errors with line and column |
TOML | TOML |
JSON.parse | JSON into maps, arrays and scalars |
CBOR, CBORValue, CBORReader, cbor | CBOR (RFC 8949), deterministic encoding |
MsgPack, MsgPackValue, MsgPackReader, msgpack | MessagePack, ext types and timestamps |
BSON, BSONValue, BSONKind, BSONReader, BSONVectorType, ExtendedJSON, bson | BSON documents, MongoDB Extended JSON v2 both ways; BSON.bind fills an object from a decoded tree |
ObjectId, parseObjectId, Decimal128, parseDecimal128 | MongoDB identifiers and 128-bit decimals |
Protobuf, ProtoMessage, ProtoReader, ProtoWriter, protoField | Protocol Buffers wire format, with or without a schema; ProtoField.payload reads a field's bytes without a copy |
ProtoSchema, ProtoFile | .proto files: messages, enums and services |
CSV, CSVReader, CSVWriter, csv | CSV, any separator: whole texts or streams, rows bound to objects by header, separator detection |
XMLSignature, signXML, parseXMLSignature, canonicalize | XML signatures and canonical XML |
encryptXML, decryptXML | XML encryption |
Base64, Base32, Base83, hexencode, hexdecode | Base64, Base32, Base83, hex |
QuotedPrintable | quoted-printable |
htmlEncode, htmlDecode | HTML character references |
PEMBlock, pemDecode | PEM |
ASN1Element, asn1Parse, berParse, OID | ASN.1 DER and BER |
Layout | fixed binary layouts from struct declarations |
Binary | typed self-describing binary stream |
putVarint, varint | varints |
std.data.encoding.jsonschema: schemaOf (the JSON Schema of an ADM type), valueOf (a JSON value as that type), Callable (a function or method described as JSON Schema and called with a JSON object), Parameter, SchemaError, SchemaErrorKind; compile, CompileOptions, Draft, Validator, ValidationError (validating JSON values against a schema of drafts 2020-12, 2019-09, 7, 6 and 4, with every format and ECMA-262 patterns).
std.data.encoding.codepages
CodePage | CP437, Windows-1252, Latin-1 |
decode, encode, forCharset | conversion, lookup by charset name |
std.data.encoding.shiftjis
encode, decode | Shift JIS (JIS X 0208) |
std.data.compress
flate | DEFLATE Reader/Writer, Inflater, inflate for one stream held in memory (with the bytes it took), and deflate to compress a whole input (large ones on several tasks) |
gzip, zlib | gzip and zlib; zlib.compress, zlib.decompress and zlib.inflate for streams held in memory |
lzw | LZW |
bzip2 | bzip2 |
lzma | LZMA and LZMA2 |
xz | xz, with the delta and x86 filters |
brotli | Brotli, reading only |
lz4 | LZ4 blocks and frames |
snappy | Snappy blocks and framed streams |
zstd | Zstandard, reading and writing, with dictionaries |
ppm | PPMd variant H, reading only (7z and RAR streams) |
std.crypto
rand, randRange, randOf | random numbers |
UUID, UUIDVersion, parseUUID, uuidNamespaceDNS, uuidNamespaceURL, uuidNamespaceOID, uuidNamespaceX500 | UUIDs (RFC 9562): random V4, time-ordered V7, name-based V5 and V3 |
ULID, parseULID | 128-bit identifiers that sort by the millisecond they were made, monotonic within one |
KSUID, parseKSUID | 160-bit identifiers that sort by second, base62 text |
nanoid, nanoidAlphabet | short random URL-safe identifiers, custom size and alphabet |
RSAPublicKey, RSAPrivateKey, generateRSAKey, RSAPadding | RSA signatures and encryption (OAEP, PKCS #1 v1.5) |
ECDSAPublicKey, ECDSAPrivateKey, generateECDSAKey | ECDSA, P-224 to P-521, secp256k1, brainpoolP256r1/384r1/512r1 |
Ed25519PublicKey, Ed25519PrivateKey | Ed25519 |
Ed448PublicKey, Ed448PrivateKey, generateEd448Key | Ed448 and Ed448ph |
x25519, x448, ecdh | key agreement |
MLKEMPublicKey, MLKEMPrivateKey, generateMLKEMKey | ML-KEM (FIPS 203) |
bcrypt, bcryptVerify | password hashes |
parsePKIXPublicKey, parsePKCS1PrivateKey, parsePKCS8PrivateKey, marshalPKCS8PrivateKey, marshalPKCS1PrivateKey, parseEncryptedPKCS8PrivateKey, marshalEncryptedPKCS8PrivateKey, … | key encodings (PKIX, PKCS #1, PKCS #8 both ways, password-encrypted PKCS #8) |
constantTimeEqual | constant-time comparison |
std.crypto.hash
MD5, SHA1, SHA256, SHA512, SHA3256, Keccak256, BLAKE2b512, RIPEMD160, … | hashes (Hasher) |
SHAKE128, SHAKE256 | extendable output |
CRC8 … CRC64, Adler32, crc32c, xxh32, xxh64 | checksums |
murmur64a, murmur3 | MurmurHash64A and MurmurHash3 x64 128, for hash tables and feature hashing |
HMAC, hmac | HMAC |
hkdf, pbkdf2, concatKDF, argon2id, argon2, Argon2Kind | key derivation (Argon2: RFC 9106, memory-hard) |
Hash | every digest by name |
std.crypto.cipher
AES, Camellia, Blowfish, DES, TripleDES, CAST5, Twofish, IDEA | block ciphers (Block); CAST5, Twofish and IDEA for old OpenPGP data |
CBC, CFB, CTR | modes |
GCM, OCB, EAX, ChaCha20Poly1305, XChaCha20Poly1305, SIV, CBCHMAC | authenticated encryption (AEAD) |
wrapKey, unwrapKey | AES key wrap (RFC 3394, RFC 5649) |
cmac | CMAC |
std.crypto.x509
Certificate, parseCertificate, parseCertificatesPEM | X.509 certificates |
Template, createCertificate, createRequest | make certificates (self-signed or signed by a CA) and certificate signing requests |
CertPool, systemCertPool | trusted roots |
VerifyOptions | chain verification |
Name | distinguished names |
std.crypto.openpgp
generateKey, KeyOptions, KeyAlgorithm | new keys (RFC 9580 version 6, or version 4): Ed25519/X25519, Ed448/X448, NIST curves, RSA |
Key, KeyInfo, readKeys, RevocationReason | certificates and secret keys: user IDs, subkeys, expiry, lock and unlock, renew, revoke, merge, sign, cleartext signatures |
Keyring, Message, Verification | decrypt and verify messages, detached and cleartext signatures |
encrypt, EncryptOptions | encrypt to keys or a passphrase, signed and compressed (SEIPD v2 AEAD, or v1 for version 4 peers) |
armor, dearmor, Armored, ArmorKind | ASCII armor |
lookupWKD, KeyServer | find keys by Web Key Directory and on HKP key servers |
PublicKeyAlgorithm, SymmetricAlgorithm, AEADAlgorithm, HashAlgorithm, CompressionAlgorithm, OpenPGPError | algorithm IDs and the error type |
Formats
std.formats
FileFormat, SignatureMatcher | format detection by content |
MediaType, parseMediaType | MIME types |
typeByExtension, extensionsByType | extension table |
detectContentType | content sniffing |
std.formats.image
Image, load, info | image, implements gfx.Raster |
ImageSequence, ImageFrame | animations: frames, delays, loops |
PNG, APNG, GIF, JPEG, WEBP, BMP, TIFF, PSD, TGA, PCX, XPM, ICO, CUR, ANI, PNM, JPEG2000, J2K | codecs; JPEG 2000 decodes all of Part 1 and encodes lossless or lossy (JPEG2000 writes .jp2, J2K raw codestreams); JPEG decodes every process but hierarchical (12-bit, lossless, arithmetic, CMYK) as libjpeg-turbo does and keeps iccProfile and exif; PNM reads and writes PBM, PGM, PPM, PAM and PFM (PNMFormat) |
SVG.decode, SVG.picture | SVG and SVGZ rendering, SMIL animation at a given time; picture(data, foreground = ink) draws currentColor and unset fills in a text colour, as a page does an inline SVG |
SVG.encode | canvas pictures as SVG |
SVG.parsePath, SVG.pathData | SVG path data |
exif.Tag, exif.IFD, exif.ImageTag, exif.PhotoTag, exif.GPSInfoTag | EXIF tags |
std.formats.audio
AudioStream, open, load, save, write, info, AudioInfo | decoded audio, seekable |
WAV, AIFF, AU, FLAC, MP3, Vorbis, Opus, AAC, M4A, WMA | codecs, read and write |
AC3, EAC3, AMR, AMRWB | codecs, read only |
AudioFormat, AudioDecoder, AudioEncoder, AudioCodec, @codec | codec interfaces, registering a format |
AudioTags, tags | tags and covers for every format |
ID3Tags, OpusTags, M4aMetadata, FlacMetadata, FlacPicture, WAVCue, AIFFMarker, AIFFComment | format-specific metadata |
OpusEncoder | Opus one packet at a time (2.5 to 60 ms, discontinuous transmission), for live connections; config() is the header a container stores |
Converter | sample rate and channel conversion |
Midi, MidiTrack | MIDI files |
SoundFont | SoundFont banks |
PCM | raw samples |
AAC decodes AAC-LC and HE-AAC (SBR, parametric stereo) up to 7.1; the encoder writes AAC-LC.
std.formats.video
Video, open | video file: tracks, frames, sound |
VideoFrame, toImage, draw, fittedSize | decoded picture |
fromPacked, PackedLayout | packed 4:2:2 camera bytes (YUYV, UYVY) to a picture |
VideoInfo, Track, Packet, FrameRate, VideoStream | tracks and packets |
Container, ContainerFormat, VideoDecoder, ContainerCodec, @codec, @decoder | container and decoder interfaces, registering a format |
MP4, MKV, AVI, FLV, OGV, MPEG, TS, ASF, MXF, ElementaryStream | containers |
H264, HEVC, AV1, VP9, Mpeg2, Mpeg4Part2, Msmpeg4v2, VP8, Theora, MJPEG | decoders |
VideoEncoder, VP8Encoder, H264Encoder | encoding pictures to packets at a bitrate (VP8, H.264 Constrained Baseline: key frames on request, temporal layers) |
WebMWriter, save, write | writing WebM: packets of VP8, VP9, AV1, Vorbis and Opus tracks, or pictures and sound encoded as VP8 and Opus |
VideoHardware, HardwareDecoder, GpuPicture, GpuImage, importGpuImage, download | GPU decoding (NVDEC, VA-API), frames kept on the GPU and drawn there by the OpenGL and Vulkan renderers |
std.formats.archive
Archive, ArchiveWriter, load | archive by signature |
extractAll, extractEntry | extraction |
Zip, Tar, SevenZip | archives |
Gz, Bz2, Xz, Tgz, Tbz2, TarXz, Zst, TarZst | compressed files and tarballs |
std.formats.docs
Document, Block, Inline, load | document model |
Markdown, PlainText, Rtf, Html, Pdf, Docx, Odt, Epub | codecs; PlainText.marks (PlainTextMarks) says what its layout writes around styled text; Html.tree gives a page's element tree as a browser reads it |
PdfFile, PdfObject | PDF objects |
std.formats.mail
Message | internet message, built or parsed |
Part, Header | MIME parts, headers |
Address, parseAddress, parseAddressList | addresses |
Maildir | Maildir folders |
std.formats.fonts
Font, Face, load, info | fonts and faces |
TTF, OTF, WOFF, WOFF2, EOT, FON | codecs |
Outline, FontMetrics, Bitmap | glyphs and metrics |
shape, features, ShapedRun, ShapedGlyph, ShapeOptions, TextDirection | OpenType shaping |
Hinting, Baselines, Axis | hinted outlines (TrueType, CFF), baselines |
VariableFace, VariationAxis, OpenTypeFace | variable fonts, OpenType tables |
sfnt.Sfnt, sfnt.Cmap, sfnt.Head, sfnt.Hhea, sfnt.Names, sfnt.Os2, sfnt.Post | the SFNT container and its tables |
std.formats.playlist
PlaylistEntry, load, save | playlists |
M3U, PLS | codecs |
std.formats.calendar
Calendar, load, save | calendars, occurrences with overrides |
CalendarEntry, EntryKind, Alarm, Attachment | events, to-dos, journal entries |
RecurrenceRule, Occurrence | repeating entries |
TimeZone, Observance, FreeBusy | time zones, free/busy |
ICalendar, VCalendar, XCal | codecs |
std.formats.contacts
Contact, load, save | contacts |
PersonName, Address, Organization, ContactDate | contact fields |
VCard, XCard, LDIF, ContactsCSV | codecs |
std.formats.translations
load, save, supports, localeOfName | translation catalogs read into and written from std.i18n.Catalog |
Po | gettext .po and .pot, written as msgcat lays them out |
CatalogFormat, CatalogCodec, codec, CatalogFormatError | the format interface, its registration and its error |
std.formats.data
INI, INIFile, INISection, INIEntry, ini | INI files: sections, comments, typed getters, objects bound by field |
DotEnv, dotenv | .env files: variables with quotes and ${NAME} expansion, loading into the environment |
std.formats.data.mmdb
open, Database, Metadata | MaxMind DB files (GeoIP2, GeoLite2, DB-IP, IPinfo) |
Record | the data stored for an IP address and its network |
Location, Place | continent, country, subdivisions, city, coordinates, time zone |
AutonomousSystem | AS number and organization |
std.formats.ai
ModelFile, load, info | model file: metadata and tensors; a file loaded by path is memory-mapped, pages gives a tensor's bytes without a copy; new ModelFile() and add build one to save |
Gguf, Safetensors | codecs, read and write |
TensorType, TensorInfo | tensor types (every ggml quantized type) |
dequantize, blockSize, blockBytes | quantized blocks to floats |
std.formats.ai.onnx
OnnxModel, load, decode | ONNX model file: graph, initializers, functions, external data; encode, save |
Graph, Node, Attribute, Function | operator graph |
TensorData, SparseTensorData, decodeTensor | stored tensors of every element type |
ValueInfo, ValueType, ElementType | declared types of graph values |
std.barcodes
Symbology, Symbol, Barcode | symbol grid or bars, decoded result |
encode, decode | any symbology; every barcode in an image |
std.barcodes.qr
encode, decode, Level | QR Code and Micro QR |
sequence | structured append |
std.barcodes.datamatrix
encode, decode, Shape | Data Matrix ECC 200, square and rectangular |
std.barcodes.aztec
encode, decode, Format | Aztec compact and full-range |
rune | Aztec runes |
std.barcodes.pdf417
encode, decode | PDF417, compact PDF417, MicroPDF417 |
sequence | Macro PDF417 |
std.barcodes.linear
encode, decode | EAN-13/8, UPC-A/E with add-ons, Code 128, Code 39, Code 93, ITF, Codabar |
std.formats.sheets
Workbook, Sheet, Cell, CellKind, Range | spreadsheets: sheets of typed cells with formulas and number formats |
load, save | read and write by signature or extension |
Workbook.calculate, Workbook.evaluate | formula evaluation: operators, references across sheets, about 110 functions |
document | a workbook as a docs.Document of tables |
Xlsx, Ods, Csv | codecs |
reference, parseReference, parseRange, columnName | B2 and A1:C3 references |
serialOf, timeOf | spreadsheet day numbers and time.Time |
std.formats.models
The model, the loader and the glTF, GLB, OBJ and STL codecs are built; the other codecs are declared with their signatures, extensions and options, and their decode/encode bodies are pending.
Model, Node, Axis | a 3D scene: a tree of placed nodes, the meshes, materials, textures, cameras, lights, skins and animations it owns, embedded resources, unit and up axis |
Mesh, Primitive, Topology, MorphTarget | geometry as flat attribute arrays and indices; normals, tangents, vertex merging, triangulation |
Material, Texture, TextureRef, TextureTransform, AlphaMode, Wrap, Filter | metallic-roughness shading with an emissive strength and the classic Phong fields, metadata for what the file attached beyond the fields, textures by resource name or URI, each reference with its coordinate set, strength and transform |
Camera, Light, Skin, Animation, Channel | cameras (projection), lights, skinning (jointMatrices) and keyframe animation (sample, apply, duration) |
load, Model.save, Model.write | read and write by signature or extension |
ModelCodec, ResourceReader, ResourceWriter, DirectoryResources, ModelError | the codec contract, with the files a model keeps beside it |
Stl | STL, text and binary, with VisCAM and Materialise colours |
Obj | Wavefront OBJ with its .mtl libraries and textures: objects and groups as nodes, polygons of any size, lines, points, vertex colours; decodeMaterials/encodeMaterials for a library on its own |
Gltf, Glb | glTF 2.0 as JSON with files beside it or data URIs (embed), and as one GLB: every core feature (scenes, nodes, meshes with every attribute, morph targets and sparse accessors, materials, textures and samplers, cameras, skins, animations) plus KHR_lights_punctual, KHR_materials_unlit, KHR_materials_emissive_strength and KHR_texture_transform; other extensions kept as text |
Ply, Fbx, ThreeDS, Dxf, Dwg, Jt | codecs (declared) |
Planned
std.formats.slides, the std.formats.models codec bodies and the container formats of std.formats.data.
Networking
std.net
Socket, Address, Connection, Stream | sockets and connections; Socket.connectDatagram, send, receive for a datagram socket with one peer; Connection.setNoDelay (on by default), Connection.peerUserId (the user at the other end of a Unix socket) |
DatagramTransport | whole datagrams to and from one peer |
Listener, Server, StreamServer, DatagramServer | server interfaces |
NetError, ErrorCode | typed failures |
resolve, NetInterface | name resolution, interfaces |
parseIPText, ipText | IP address text to bytes and back |
IPBlock, parseIPBlock | CIDR blocks of IPv4 and IPv6 addresses and whether one holds an address |
writeAll, readFull | every byte to, or a full buffer from, any stream |
RemoteFiles | remote file access (FTP, SFTP, WebDAV) |
std.net.tcp, std.net.udp
Client, Server | TCP and UDP clients and servers |
dial, Peer | UDP socket bound to one peer, a datagram transport |
std.net.tls
Conn, dial, client, server | TLS 1.3 and 1.2 connection, over a socket or any stream |
HandshakeCarrier | TLS 1.3 handshake without records, for QUIC |
Config | certificates, names, versions |
KeyPair, parseKeyPair, loadKeyPair | certificate chain and private key from PEM, encrypted PKCS #8 keys with a password |
DTLSConn, dtlsDial, dtlsClient, dtlsServer | DTLS 1.3 and 1.2 over any datagram transport |
DTLSListener, dtlsListen | DTLS server on a UDP socket, stateless cookies |
DTLSConfig, SRTPProfile, SRTPKeys | DTLS settings, DTLS-SRTP profiles and keys, connection IDs |
std.net.tls.acme
Manager, CertificateKey | certificates obtained and renewed for an HTTPS server: on demand, tls-alpn-01, http-01 and dns-01, renewal information |
CertificateStore, FolderStore, VaultStore | where the account key and certificates are kept |
Client, Directory, Account, Order, Authorization, Challenge, Identifier, Status, ChallengeType | the ACME protocol (RFC 8555) step by step |
ExternalAccountBinding, RenewalInfo, renewalId | external accounts, renewal windows (RFC 9773) |
DNSProvider, dnsRecordName, dnsRecordValue, tlsAlpnCertificate, reverseName, acmeTLSProtocol, http01Prefix | challenge responses |
Problem, AcmeError | the CA's problem documents |
letsEncrypt, letsEncryptStaging, zeroSSL, buypass, buypassStaging, googleTrustServices, googleTrustServicesStaging | CA directories |
std.net.quic
dial, listen, Listener | QUIC client and server (RFC 9000, 9001, 9002) |
Connection, Stream | bidirectional and one-way streams, datagrams, key update |
Config | TLS settings, limits, idle timeout, keep-alive, Retry |
TransportError, TransportCode, ApplicationError, ClosedError | errors |
appendVarint, varintLength, parseVarint | variable-length integers |
std.net.stun
dial, client, Client, ClientConfig | STUN and TURN client (RFC 8489, RFC 8656): binding, allocate |
Allocation, RelayedPeer, AllocateOptions, Relayed | a relayed address on a TURN server: permissions, channels, UDP and TCP relays (RFC 6062) |
Server | STUN and TURN server over UDP, TCP, TLS and DTLS |
Message, parseMessage, isMessage, Method, AttributeType, Integrity | the message codec, integrity and fingerprint |
longTermKey, shortTermKey, restCredentials | credentials: long-term (MD5, SHA-256), short-term, shared secret |
parseURI, resolveURI, ServerURI, Transport | stun:, stuns:, turn: and turns: URIs |
StunError, ErrorCode | errors, with the server's error code |
std.net.sdp
parse, SessionDescription, MediaDescription, Attribute | SDP session descriptions (RFC 8866), read and written |
RtpMap, FormatParameters, RtcpFeedback, Extension, SourceAttribute, SourceGroup, Rid, Simulcast, Msid | the media attributes WebRTC uses |
Group, Fingerprint, TransportParameters, Setup, Direction | BUNDLE groups, certificate fingerprints, ICE and DTLS parameters, directions |
Candidate, parseCandidate, candidateText, CandidateType | ICE candidates, in a description or trickled |
SdpError | errors, with the line |
std.net.rtp
Packet, parsePacket, isRtcp | RTP packets (RFC 3550) read without copying and written into a buffer, header extensions (RFC 8285) |
parseRtcp, Compound, SenderReport, ReceiverReport, ReceptionReport, SourceDescription, Bye | RTCP reports |
Nack, Pli, Fir, Remb, TransportFeedback | RTCP feedback (RFC 4585, RFC 5104, REMB, transport-wide congestion control) |
Packetizer, depacketize, PayloadFormat, startsFrame, startsKeyframe, temporalLayer | payload formats: Opus, VP8 (with temporal layers), VP9, H.264, AV1 |
retransmission, original, FecSender, FecReceiver | retransmission packets (RFC 4588) and FlexFEC repair packets (RFC 8627) |
redBlock, redundant, redundantCount, writeRedundant, ulpAsFlex | redundant data (RFC 2198): the primary block, the blocks sound carries again, ULPFEC repair blocks (RFC 5109) |
JitterBuffer, Frame | packets in any order, frames out in order |
srtp, SrtpSession | SRTP and SRTCP (RFC 3711, RFC 7714), keyed from DTLS-SRTP, packets protected in place |
RtpError | errors |
std.net.sctp
connect, accept, Association, AssociationState, Options | SCTP associations (RFC 9260) in user space over any datagram transport, as WebRTC runs them over DTLS |
Stream, Message, PayloadProtocol | streams of whole messages, ordered or not, reliable or given up after a number of sends or a lifetime, with stream reset |
SctpError | errors |
std.net.webrtc
PeerConnection, Configuration, IceServer, IceTransportPolicy | a connection to a browser or another program through NATs (ICE, DTLS, SCTP), set up by offer and answer |
LocalTrack, RemoteTrack, TrackKind, Stats, SendStats, ReceiveStats | audio and video tracks: encoded frames (Opus, VP8, VP9, H.264, AV1) written and read whole; simulcast layers (addSimulcast, rid); skip for sound left out |
SessionDescription, SdpType, IceCandidate | what signalling carries: descriptions and candidates |
DataChannel, DataChannelOptions, DataMessage | data channels: text and binary messages, ordered or not, reliable or given up after a count or a time |
PeerConnectionState, SignalingState, IceConnectionState, IceGatheringState, DataChannelState | states |
WhipClient, WhepClient, WhipServer, WhepServer | publishing to and playing from a server with one HTTP request (WHIP, WHEP) |
WebRtcError | errors |
std.net.proxy
Dialer, connect | tunnels through SOCKS4, SOCKS4a, SOCKS5, HTTP and HTTPS proxies; chains |
Binding, Association | SOCKS BIND and SOCKS5 UDP relay |
SocksServer, Request, Command | SOCKS4, SOCKS4a and SOCKS5 server |
relay | copies both ways between two streams |
ProxyError, ErrorKind | errors |
std.net.http
Client, get, post, postJSON | client |
Server, ServeMux, Context, Handler, Middleware | server |
Request, Response, Header, Cookie, CookieJar | messages |
FileServer, serveFile | static files |
Transport | connection pool, HTTP/1.1, HTTP/2 and HTTP/3 |
HTTP3Mode | when the client uses HTTP/3: Off, Advertised (Alt-Svc), Always |
Proxy, EnvironmentProxy, StaticProxy | HTTP, HTTPS and SOCKS proxies for the client, from the environment or one URL |
ForwardProxy | handler that serves as an HTTP proxy (CONNECT tunnels, forwarded requests) |
CrossOriginProtection | cross-origin request protection |
EventReader, ServerEvent | reads server-sent events from a response body |
parseChallenges, AuthChallenge | the challenges of WWW-Authenticate headers: scheme and parameters |
std.net.http.http2
Conn, Stream, Framer | HTTP/2 |
Encoder, Decoder | HPACK |
std.net.http.http3
Conn, Stream, Settings | HTTP/3 over QUIC |
Encoder, Decoder, Table | QPACK |
Http3Error, ErrorCode | errors |
std.net.grpc
Client, ClientStream, CallOptions | gRPC client: unary and streaming calls |
Server, ServerCall, UnaryHandler, StreamHandler | gRPC server |
Status, Code, Metadata | status codes and metadata |
Codec, Compression | message codecs, compression |
std.net.http.websocket
Conn, dial, Upgrader | WebSocket; on the web dial opens the browser's |
ReconnectingConn, Hub | reconnects, broadcast |
std.net.http.webpush
Sender, PushMessage, Urgency, maxPayload | send and cancel push messages (RFC 8030), encrypted with aes128gcm (RFC 8291) |
VapidKey, generateVapidKey, parseVapidKey | application server identification (VAPID, RFC 8292) |
Subscription, parseSubscription | a browser's push subscription |
PushError, PushErrorKind | the push service's refusals: expired subscriptions, rate limits |
std.net.http.openapi
parse, Document | OpenAPI descriptions (3.2; reads 3.0 and 3.1), JSON or YAML, written back with json and yaml; problems checks them against the specification |
Info, Server, PathItem, Operation, Parameter, RequestBody, MediaType, Encoding, Response, Header, Callback, Example, Link, Tag, Components, SecurityScheme, OAuthFlows | the objects of a description, with their extensions and references |
Document.addRoutes, Document.serve, Document.page | operations from a ServeMux's routes; /openapi.json, /openapi.yaml and a documentation page |
Validator, ValidatorOptions, Match, Problem | requests, responses and webhooks checked against a description; middleware answering with problem documents |
ParameterIn, Style, SchemeKind, OpenAPIError | parameter locations and styles, security scheme types, errors |
std.net.graphql
parse, Document | GraphQL documents (September 2025 specification), printed as graphql-js prints them |
parseSchema, schemaOf, Schema, @graphql | schemas from SDL or from annotated ADM types (subscriptions from methods returning channels): validation, execution, introspection, schema coordinates |
Request, Response, GraphQLError, Location | a request and its response, decode into a typed value |
ResolveInfo, Resolver, Subscriber, TypeResolver, ScalarCoercion | resolvers, subscription sources, abstract types and custom scalars |
Subscription | a running subscription's responses |
Handler | GraphQL over HTTP and graphql-transport-ws (subscriptions over WebSocket) for std.net.http |
Client | requests over HTTP, subscriptions over one shared WebSocket |
SchemaElement, ElementKind | what a schema coordinate names |
SchemaError, ClientError, SyntaxError | errors of schemas, clients and documents |
std.net.http.httptest
Server, ResponseRecorder, newRequest | HTTP test kit |
std.net.http.webdav
Client, Server | WebDAV, over any std.fs store |
caldav.Client, caldav.Calendars, caldav.CalendarObject | CalDAV client and server |
carddav.Client, carddav.AddressBooks, carddav.AddressObject | CardDAV client and server |
std.net.dns
Client, lookup, lookupHost, lookupMX, … | resolver |
serviceTargets | the host:port of a service's SRV targets, in order |
Server, Zone, Mux, Forwarder, Secondary | server |
Message, Record | wire format |
Update, TSIGKey | dynamic updates, TSIG |
std.net.dns.secure
TLSTransport, HTTPSTransport | DNS over TLS and HTTPS |
TLSServer, HTTPHandler | the server side |
std.net.dns.dnssec
Validator, verify, TrustAnchors | validation |
signZone, generateKey | zone signing |
std.net.dns.mdns
query, browse, Service | multicast DNS, service discovery |
Responder | announces services |
std.net.url
URL, parse | URLs |
Values, parseQuery | query strings |
Template | RFC 6570 templates |
Pattern | URL patterns |
urlEncode, pathEscape, queryEscape | escaping |
std.net.multipart
Reader, Writer, Form, Part | multipart bodies |
std.net.ssh
Client, Server, Session | SSH |
Process, Channel | commands, shells, subsystems |
PrivateKey, PublicKey, generateKey, loadKey | keys |
Certificate | OpenSSH certificates |
Agent, KnownHosts | agent, known hosts |
std.net.sftp
Client, Server | SFTP |
std.net.ftp
Client, Server | FTP and FTPS |
std.net.mail
mail.Client | mail account: send, list, fetch, watch |
smtp.Client, smtp.Server | SMTP |
imap.Client, imap.Server, imap.Search | IMAP |
pop3.Client, pop3.Server | POP3 |
imap.MaildirAccount, pop3.MaildirDrop, smtp.MaildirHandler | Maildir storage |
std.net.ldap
Client, Server | LDAPv3 |
Entry, DN, Filter | entries, names, filters |
MemoryDirectory | directory in memory |
parseLDIF | LDIF |
std.net.snmp
Client, Server, TrapReceiver | SNMP v1, v2c, v3 |
std.net.mqtt
Client, Server, Message | MQTT 3.1.1 and 5.0 |
std.net.ntp
Client | NTP and SNTP queries |
Clock | clock following several servers |
Server | NTP server |
std.net.features
FeatureServer | feature server: signed assignments per subject over one HTTP POST; the client is the Features service |
Rules, Segment, Condition, Rule, Feature, Group, Variant | rules: segments by place, network, version, system, locale and attributes; rollout in percent; A/B groups with weighted arms |
compile, RuleSet, bucket | checking rules and deciding with them |
RuleSource, MemoryRules, FileRules | where a server takes its rules from; a JSON file read again when it changes |
Subject, Seen, Assignments, Assignment, GroupAssignment | the request and the reply |
sign, verify, digestOf | Ed25519 signature of a reply and the digest of its content |
FeaturesError, FeaturesErrorKind | errors |
std.net.syslog
Client, Server, Message | syslog, RFC 5424 and RFC 3164 |
Encoder | log encoder for the Logging service |
std.net.irc
Client, Server, Message | IRC with IRCv3 |
std.net.telnet
Client, Server, Session | Telnet |
std.net.sasl
ScramClient, ScramServer, ScramCredentials | SCRAM authentication |
saslprep | SASLprep (RFC 4013) for user names and passwords |
Planned
std.net.jmap.
Media & Devices
std.media.player
MediaPlayer | plays audio and video |
Playlist, Track | what it plays |
AudioSink, Visualizer, LevelBarsVisualizer | output, visualizers |
See the example.
std.media.call
localAudio, localVideo | a microphone or sound stream, a camera or video stream, as WebRTC tracks (Opus; VP8 or H.264) |
play | a remote sound track through a speaker |
frames, RemoteVideo | the decoded pictures of a remote track |
std.media.dsp
Biquad, Equalizer, EqBand, EqPreset | filters, equalizers |
Compressor, Limiter, Gain, Balance, StereoWidth | dynamics, levels |
Reverb, Delay, Chorus | effects |
Spectrum, LevelMeter | analysis |
MelSpectrogram, MelScale, MelFraming | energy in mel bands frame by frame, the input of speech models |
AudioEffect, AudioProcessor, EffectSwitch | effect interfaces, bypass switch |
std.media.synth
Synth | synthesizer: built-in waveforms or a SoundFont, MIDI playback |
std.devices
Camera, cameras, openCamera | cameras (V4L2): frames at a chosen size, rate and format; the camera's modes, controls (exposure, focus, white balance) and configure |
Frame, PixelFormat, toImage, toVideoFrame | a captured frame (MJPEG, YUYV, UYVY, NV12, YUV 4:2:0, grey) as an RGBA image or as YUV planes |
CameraMode, CameraControl, ControlKind | what modes() and controls() report |
Speaker, speakers, defaultSpeaker, openSpeaker | sound output through the desktop's sound server (shared memory where it allows) or the sound card; an empty id follows the desktop's default; the speaker's own volume, mute, unmute, muted |
Microphone, microphones, defaultMicrophone, openMicrophone | sound input, the same way, with its own volume and mute |
volume, muted, mute, unmute | a speaker's or microphone's own volume and mute, shared by every program using it: through the sound server or on the card's mixer |
soundChanges, SoundChange, SoundChangeKind | speakers and microphones added, removed, changing volume or mute, and the desktop's default changing, as they happen |
InputDevice, inputDevices, openInput, InputEvent, InputKind, Axis | keyboards, mice and game pads read event by event outside any window: reports, axes, keys down, exclusive grab, rumble |
Gamepad, gamepads, openGamepad, GamepadControl, GamepadState, GamepadEvent | game pads by the names games use (A, B, X, Y, shoulders, triggers from 0 to 1, sticks with a dead zone, D-pad, Start, Back, Guide), rumble |
GamepadMapping, parseGamepadMappings | which of a pad's buttons and axes make each control, as lines of SDL's game controller database; pads that follow the kernel's layout need none |
PowerSource, powerSources, powerChanges, PowerChange, PowerKind, ChargeState, BatteryHealth | batteries, AC adapters and UPSs: charge, charging state, time to empty or full, health, wear, cycle count, a peripheral's battery; from UPower, the kernel or a UPS's HID reports, with their changes as they happen |
HidDevice, hidDevices, openHid | raw HID devices: input, output and feature reports, report descriptors |
SerialPort, serialPorts, openSerial, Parity, FlowControl, ModemLines | serial ports in raw mode at any baud rate: timed reads and writes (a net.Stream), framing, flow control, drain, break, the modem lines |
Gps, gpsDevices, openGps, GpsFix, Satellite, GnssSystem, FixQuality, FixMode | GPS receivers on a serial port (NMEA 0183, the baud rate found) or through gpsd: position, altitudes, speed, course, time, fix quality, DOPs and the satellites in view and used |
NmeaSentence, parseNmea | one NMEA 0183 sentence taken apart, its checksum checked, and written back |
Linux only for now.
AI
std.ai.llm
LanguageModel, load, Device | language model from a GGUF file or a Hugging Face model folder (Llama, Mistral, Qwen2, Qwen3, Qwen3-MoE, Gemma 2/3, Phi-3), on the CPU or the GPU; load's gpuMemory caps the GPU memory it takes, and a mixture-of-experts model larger than that keeps a part of its experts in host memory (hostMemory caps the page-locked copies); weights are read from the mapped file, so a model larger than memory loads |
Session | conversation: sampling, generation, chat; schema and fill(target, text) hold the answer to a JSON Schema (a struct's, filled from the reply); precision runs prompt batches on the GPU's tensor cores |
ChatMemory, Forgetting | a conversation kept within a budget of tokens: older turns summed up by the model or dropped, room made before each question |
LiveChat, LiveProvider, LiveConnection, LiveEvent, LiveEventKind, LiveSetup | a spoken conversation both ways at once with a hosted model (OpenAI's Realtime API, Gemini's Live API through the adm.ai libraries' client.live()): sound and text in, speech, words and calls out as they come |
ToolOutput | a tool result with pictures (a screenshot, a chart), from a tool's look |
Chat, RemoteChat | a conversation with any model: a local Session or a hosted one (the adm.ai provider libraries' client.chat()), with the same tools, messages and streaming; model can change between replies |
ChatProvider, ChatRequest, ReplyStream, ReplyEvent, Usage, StopReason | what a provider library implements so RemoteChat runs over its API |
RemoteError, RemoteErrorKind, remoteErrorKind, schemaOf | the failures of hosted APIs, one kind list for every provider; a tool's parameters as JSON Schema |
withDocuments | a message with its documents written as Markdown before its text |
Tuning, Target | LoRA fine-tuning from model.tune(rank, alpha, targets, precision): learn from texts or chat conversations (AdamW steps on the CPU or the GPU, the model's weights untouched), loss, save as a GGUF adapter llama.cpp and Ollama read |
Adapter | a GGUF LoRA adapter and its scale, applied by load(path, adapters = ...) |
Message, Role, Reasoning, RemoteFile | chat messages (text, pictures, sound, videos, documents), thinking; files uploaded to a hosted model's provider, named in a message |
ChatFormat, detectChatFormat | chat formats of model families |
Tokenizer, loadTokenizer | tokenizers of GGUF models (BPE, SentencePiece, WordPiece, Unigram) and Hugging Face tokenizer files (tokenizer.json, vocab.json with merges.txt, vocab.txt); pairs of texts for cross-encoders |
Stats | prompt and generation speed |
toolsOf | the tools of an MCP server (std.proto.mcp) as tools of a session |
std.ai.tensor
Weights, loadWeights | quantized weights, SIMD matrix-vector multiply |
rmsNorm, layerNorm, softmax, silu, gelu, GeluForm, erf, rope | transformer operations |
Tensor, tensorOf | n-dimensional values of any ONNX element type |
std.ai.onnx
Model, load | ONNX model ready to run: run takes input values by name and returns the outputs; on a GPU the graph runs there with its tensors kept in device memory, its products on the tensor cores with precision = gpu.Precision.Tf32 |
Value | a tensor or a sequence of tensors |
std.ai.retrieval
Index, load, Matching | texts and documents cut into passages, embedded by any embedder, searched by meaning, by words (BM25) or both, the best reordered by a reranker; large indexes searched through a graph (HNSW); ask a chat to answer from the best passages; saved to a file |
Passage, passagesOf | a passage found with its source and score; how a text is cut |
std.ai.speech
SpeechModel, load, SpeechTask | Whisper speech to text: transcribe a recording, listen to a microphone as you speak |
Voice, loadVoice | Kokoro text to speech: speak English text as sound with an American or British voice, misaki's pronunciations built in |
Heard | a sentence listen heard so far, and whether it is finished |
std.ai.diffusion
DiffusionModel, load | Stable Diffusion: draw a picture from a prompt |
Lora | a LoRA file and its strength, merged into the model at load |
std.ai.embeddings
EmbeddingModel, load, Pooling | texts as vectors, from GGUF (BERT, Nomic BERT) or ONNX embedding models |
similarity, nearest | cosine similarity, the closest vectors of a list |
Embedder | what turns texts into vectors: a loaded model, or a hosted one of the adm.ai libraries |
RerankModel, loadReranker, Reranker | cross-encoders (bge-reranker, ms-marco MiniLM; GGUF or ONNX): how well each passage answers a question, from 0 to 1 |
Graphics & UI
std.ui
UI, UIConfig | UI service |
StyleSheet, StyleRule, rule | rules that restyle components by selector; UI.addStyles(sheet), UI.removeStyles(sheet), components.Styled(sheet), StyleSheet.add, changed |
ComponentRenderer, RenderContext, RenderPasses, Geometry, TextKind, WindowState, WindowKind, CloseRequest, MenuEntry, PointerEvent, PointerPhase, Modifiers, Limit, TextInputClient, TextRange, StateChange, @action, Action, ActionInfo, actionsOf, Viewport, Theme, Palette | component drawing, resolved layout, state events, actions |
Theme, themeOf | the values styles read as theme; themeOf(component) is the theme that component's style reads: the nearest one provided, else UI.theme() |
DragData, DropEffect | what is dragged: a value of the application's own, text, file paths, other forms by MIME type; what a drop would do (none, copy, move, link) |
StyleNode, StyleClass, BoxStyle, FontStyle, Selector | style model |
IconSet | named icons an application adds with UI.addIcons; components take an icon by name (Button(icon = "plus")) |
ClickEvent, KeyEvent, MouseMoveEvent, TextInputEvent, … | events; target is the component under the pointer, the window's root when no other is |
Key, KeyCode, typesCharacter | the key of a KeyEvent by its meaning in the layout (Key.A, Key.Enter, Key.F5); whether a key types a character |
Display, Appearance, ColorScheme, Contrast | displays and system appearance (Linux) |
pickFolder, pickFiles, saveFile, FileFilter | the system's file dialogs (the desktop portal on Linux, the common item dialog on Windows), shown over the active window: let picked = try await pickFiles("Open", filters = [FileFilter{name: "Images", patterns: ["*.png"]}], multiple = true); none or an empty array when cancelled. Run them on a task from a handler. |
std.ui.icons
@icons | on a partial type: turns a folder of SVG files into an icon set while the program is built (@icons("assets/icons") partial type AppIcons {}); the type gets set() !IconSet for UI.addIcons and one name per file (arrow-left.svg is ArrowLeft) |
fromSvg | an IconSet from SVG documents read at run time; a tinted icon follows the text colour where it says currentColor or sets no fill, and keeps the colours it sets |
std.ui.styles
Box, Layout, Tracks, Clipping | size, placement and arrangement |
Shape, Background, Borders, Outline, Shadows, Filters, Backdrop, Compositing, Effects, Transforms | painting and effects |
Decorated, Control | umbrellas: everything a box is painted with (background, borders, outline, shadows on one shape); a control's paint, text, pointer behaviour and timing |
Foreground, Typography, Editable, TextRendering | text |
Interaction, Scrollbars, ImageContent, Motion | pointer, scrollbars, images, transitions |
Font, Fill, Sizing, Auto, Anchors, AnchorLine, AnchorEdge, LineStyle, Border, Paint, BackgroundFill, Ring, Shadow, Filter, Transform, Track, Cell, FontWeight, ParagraphLayout, Decoration, TextRun, Cursor, Scrollbar, Transition, Easing | style values |
Align, Alignment, Direction, Arrange, Distribute, Position, Layer | alignment, direction, arrangement and positioning |
std.ui.charts
Chart, ChartViewport, ChartPoint | a plot of the series in its block: bound viewport (an empty axis fits the data), wheel zoom and drag pan, onPointSelected and event pointSelected, drawTo(painter, width, height) |
LineSeries, AreaSeries, BarSeries, ScatterSeries | series of ys over xs (the indices without); long lines are thinned per pixel column keeping every peak |
Axis, AxisSide, Legend | marks of round steps on a side of the plot, with label, grid and format; the series and their colours |
ChartTransform, ChartPart, ChartSeries, niceTicks, tickText | from data to pixels and back; what a part and a series of a chart answer; round axis steps and their text |
std.ui.maps
MapView | a map of raster tiles: bound center and zoom, tiles, drag pan, wheel and double-click zoom; tiles fetched on its tasks and kept |
Marker, Polyline, Polygon | what its block puts on it: something at a coordinate (a pin without content), a line, an area |
TileSource, XyzTiles, MapError | where tiles come from; tiles at an XYZ address over HTTP, kept in cacheDir; a tile the server did not give |
MapTransform, MapPart, worldPixel, worldCoordinate | from coordinates to the view's pixels and back; what a part answers; a coordinate's pixel of the world map at a zoom and back |
std.ui.components
Row, Column, HBox, VBox, Grid, Layered, Panel, ScrollView, SplitPane, Spacer, Divider, WindowDrag | layout: rows, columns, grids, stacked layers, scrolling, panes a divider resizes, the bar an undecorated window is moved by |
TabMove | a tab of a TabStrip dragged from one place to another (onMove, event moved); onClose gives each tab a cross |
FocusScope | remembers which component in it had the keyboard focus and gives it back when Tab returns; trap keeps Tab inside |
PersistScope | puts the kept values of what it holds under its name: PersistScope("left") { Editor() } |
ViewHost, TakenView | views placed by key from code (insert, remove, move, replace); take moves a live view to another host |
List, RowItem, Source, SourceChange, SourceChangeKind, SelectionMode, ListStyle, ListRowStyle | a virtualised list List<T, I = T> (an item is its own id unless id returns another) over an array or a Source<T> (count(), at(i), changes()): id, selected, selection, rowHeight, rowRenderer (takes a RowItem<T>: content, index, selected, current, and in a tree depth and expanded), onChange, onOpen, events changed and opened, reveal(id), current() |
Tree, NodeToggle, TreeStyle | a tree Tree<T, I = T> on a List of the rows that show: roots, id, expand (a node's children, asked when it first opens), leaf, expanded, selected, selection, rowHeight, rowRenderer, onChange, onOpen, onToggle, events changed, opened and toggled (a NodeToggle<T>), reveal(id), current() |
DataGrid, GridColumn, GridSort, DataGridStyle | a grid DataGrid<T, I = T> on a List: rows or source, columns (GridColumn<T>: title, cell, width, order, sortable, key, resizable), id, selected, selection, rowHeight, sortBy, descending, persist, onChange, onOpen, onSort, events changed, opened and sorted (a GridSort), reveal(id), current() |
Form, Field | a form (onSubmit, submit(), invalid(), event submitted) and one of its values with a name and an error shown under the control; the form submits only while no field has one |
Themed | gives what it holds a theme of its own (theme): their styles read it where they name theme |
Provide<V> | gives what it holds a value they find with context<V>() |
Draggable, DropTarget | something dragged inside a window, with a preview that follows the pointer; a place it, or files and text dragged in from another application, are dropped on |
Text, Heading, Label, Link, Image, Icon, Badge, Chip, Avatar | text, pictures, icons by name, short notes and tokens |
Canvas | a box the application draws in itself |
Button, ToggleButton, SplitButton | buttons (any component takes onClick) |
Checkbox, Radio, Switch, Slider, Dropdown, ComboBox | choices; a dropdown and a combo box take options of any type, read through text |
TextField, TextArea, SearchField, NumberField | text and number entry |
ColorPicker, ColorWell | a colour picked on a square of saturation and value, strips of hue and opacity, hex or swatches; a well opens a picker from a square of the colour |
Stepper, Step | the steps of a task done in order, one page shown at a time under a line of their titles |
MenuBar, Menu, MenuItem, SubMenu, MenuSeparator, ContextMenu | menus; a long one scrolls its lines past twelve, and with openAtChecked opens at its checked line |
Tabs, Tab, TabStrip, Breadcrumbs, Accordion, AccordionItem, Toolbar, StatusBar | pages, sections, bars |
Popover, Dialog, Drawer, HoverCard, Tooltip, Toast, Side | content that floats over the window; the side it opens on |
Toasts, ToastHost, ToastKind, ToastNotice, ToastAction | notices asked for in code: Toasts is an interface (show(text, kind, lasts, action, onAction), show(ToastNotice), dismiss(number), clear()) found with context<Toasts>(), callable from any task; ToastNotice has title, body, kind, lasts, actions (ToastAction{label, run}), progress (a bar; the notice stays while it is below 1) and replaces (the number of a shown notice to update in place); ToastHost(limit = 3) { ... } provides the standard one and stacks its notices; Toast has body, kind, action, onAction, actions and progress |
WindowChrome | the frame of a window drawn by the application, given as WindowConfig.chrome: title, icon, header, minimize, maximize, close |
ProgressBar, Spinner | progress |
ButtonStyle, ToggleButtonStyle, TextStyle, TextFieldStyle, MenuItemStyle, PanelStyle, RowStyle, ColumnStyle, GridStyle, ScrollViewStyle, DialogStyle, PopoverStyle, MenuStyle, DropdownStyle, MenuBarStyle, AccordionItemStyle, ControlStyle, MarkedStyle, MarkStyle, BarStyle, FigureStyle, BoxStyle | the components' styles |
std.ui.renderer
Host, GLSurface, VulkanSurface, PixelSurface | what a window system provides: windows, events, text input, clipboard, displays, tray; OpenGL or Vulkan surfaces, or windows that take pixels |
Renderer, getRenderer | renderer interface |
Window, WindowConfig, PlatformEvent, Frame | windows, low-level events, frames |
NativeWindow, WindowHandles | a window as the window system names it (X11 id, HWND, NSWindow), from a host that implements WindowHandles; what a native dialog is shown over |
opengl, vulkan, cpu | renderers: OpenGL, Vulkan 1.2 or newer (the same GPU canvas as SPIR-V, in floats on a device without doubles), the CPU canvas shown as pixels with no GPU (desktop windows and web canvases alike) |
std.gfx
Raster | pixel surface shared by images and canvases |
Mask, RectangleMask, CircleMask, PathMask | masks |
RowMask, coverageRow, coverageBounds, luminanceCoverage | masks a row at a time, and where they cover |
std.gfx.color
Color, parse | colors, CSS syntax |
RGB, HSL, CMYK, YCbCr, Gray, … | color models |
Palette, BlendMode | palettes, blending |
std.gfx.canvas
Canvas | CPU drawing surface, implements gfx.Raster |
LiveRaster | a raster changed in place part by part: mark(rect) says what changed, and GPU renderers update only those rectangles of the texture they keep |
Painter, DrawContext, Picture, record | drawing interface, recording, replay, picking, SVG and PDF export, comparing recordings call by call; drawAtlas for sprites, mesh warps |
Paint, LinearGradient, RadialGradient, ConicGradient, Pattern, Noise, MeshGradient, linear, radial, noise | colors, gradients (OKLab, linear light, sRGB), image and picture patterns, noise, mesh gradients |
ColorStop, Spread, ColorSpace | gradient stops, spread and interpolation space |
ShaderPaint | paint from a @fragment shader, on the GPU or the CPU |
DrawState, Composite, Sampling, ClipRegion | transform, clip, alpha, Porter-Duff operators, blend, sampling |
Border, LineStyle | CSS borders: width, paint and style per side, rounded corners |
Effect, DropShadow, InnerShadow, OuterGlow, InnerGlow, Blur, Outline, ColorAdjust, ColorMatrix | group effects |
Layers, Layer, LayerGroup, LayerItem | layer stacks with masks, clipping layers and folders |
TextStyle, TextAlign, TextBaseline, TextOrientation, TextMetrics, GlyphBox | shaped, hinted text, horizontal or vertical |
Paragraph, ParagraphStyle, TextSpan, TextLine | wrapped paragraphs of styled spans in both directions (Unicode bidi): aligned or justified lines, indents, tab stops, word spacing, a line limit with an ellipsis, balanced lines; shaped once and set again in any width (withWidth), the first baseline from the font metrics (firstBaseline) |
std.gfx.render
DrawCommand, CommandKind | render commands a recording keeps for GPU renderers (clears, blits, video, moves of the pixels a frame already shows) |
std.gfx.scene
Draws a std.formats.models scene to an image on the CPU: the model's camera or one framing the scene, its lights or a key light, skins and morph targets at an animation time, metallic-roughness shading with every texture slot, mipmapped textures, blended surfaces, supersampling.
render | render(model, width, height, options) draws the model into a new Image |
RenderOptions | camera (the node to look through), time (seconds into the animations), background, samples (drawn pixels per output pixel along each axis, 1 to 4) |
std.gfx.processing
Pipeline | chained image operations |
filters | blur, sharpen, grayscale, contrast, … |
transform | resize, crop, fit, seam carving |
analysis | saliency, histogram, dominant color, perceptual hashes and similarity, local features, BlurHash |
std.simd
load16, store16, add, mul, min, max, shuffle, blend, sum, … | operations on vector types |
std.gpu
DeviceBuffer, upload, deviceBuffer | GPU memory kept between cuda def launches; deviceBuffer<T>(count) makes one of zeros on the device without copying from the host |
Readback | reads a buffer back without waiting for launches queued after its start |
HostBuffer, hostBuffer | page-locked host memory; buffer.write(from, start, count, at) queues a copy of a range of it to the device and returns at once |
available, deviceName, freeMemory, capability | device info, bytes of GPU memory free, compute capability times ten (0 on the CPU path) |
Precision | how the AI libraries multiply on the GPU: Exact (the default) or Tf32, the tensor cores of Ampere and newer GPUs, several times faster with results that differ slightly |
Tooling
std.testing
@test, @benchmark, @fuzz, @skip, @only, @timeout, @parallel, @golden | annotations for check suites |
beforeAll, beforeEach, afterEach, afterAll | lifecycle hooks of a suite |
expect, expectEqual, expectTrue, expectError, … | assertions |
skip | a test that finds it cannot run on this machine (no device, no permission) ends with return testing.skip(reason) and is reported skipped |
std.reflection
attrs, decls, fields, methods, invoke | discovery and calls, behind attributes |
Field | one field of a value: its name, kind, type and annotations (attr, hasAttr), the doc comment of an annotated field (doc), typed reads and writes, and set, which stores a boxed value of any kind the field holds |
typeName, kindOf | runtime type info |
MetaContext, … | meta contexts |
receive, close | a channel carried as any, whatever its element type: the next message boxed and whether there was one; closing it |
instantiate, field, arrayField, elements, arrayOf, mapOf, defaultOf | arrayField addresses an array carried as any as a Field of its own; defaultOf computes the default a parameter of an annotated function is declared with; building and reading values by descriptor; arrayOf makes an array of a described element type from boxed values, mapOf a map<string, V> of a described value type |
TypeDescriptor, TypeKind | a type as spelled in a signature or field: kind, typeName, the optional/errorable/future flags, an array's, map's or channel's element, a map's key, a tuple's elements |
EmbeddedFile | a file an annotation builds into the program |
BuildMetaContext<T> | context of an annotation that runs during the build |
SourceEditor, SourceField, SourceAnnotation | the fields a build-time annotation of a type reads, and the members and declarations it adds |
std.reflection.buildhost (run, runType) is the build machine's side of those annotations; the compiler's helper programs call it.
std.ide
@ide, IDE | service panels for a connected IDE |
IdeTable, IdeLog, IdeLogEntry, IdeKind | panel kinds: value, table, series, tree, text, log |
std.cli
parseArgs, Args | the command line, read by asking: has, flag, count, value (string, int, float, duration, an enum member), values, then unknown and rest, or end, which gives the positionals and refuses a name nobody asked for with a "did you mean" (hide keeps a name out of those) |
@flag | annotation: fills a module variable or constant from the command line; on a field or a parameter, a flag of a command (annotations) |
@command, @arg | annotations: a function, method or type as a command or a group of commands; a field or parameter as a positional argument |
run | runs the command the command line names and returns the exit status; --help and help at every level; completion bash|zsh|fish|powershell writes the shell's completion script (eval "$(tool completion bash)"), which completes commands, flags and enum values; a program with @flag variables and no commands writes it for --completion <shell> |
complete | gives completion the candidates for a value only the program knows: a flag or argument by name ("profile", "remote add name"), or the words of a command added by a call |
addCommand | adds a command by a call: a path ("cache clear"), a description and a function that reads the Args left for it |
help, helpTemplate, helpMarkdown | the help screen --help prints for the @flag variables; a Jinja template that draws it instead of the built-in layout; descriptions read as Markdown |
UsageError, UsageKind | what is wrong with a command line |
std.cli.terminal
isTTY, size, colors | whether a standard stream is a terminal, its Size in cells, how many colors it shows (ColorDepth) |
failure, warning, success, info, heading, emphasis, dim, link, code, prompt | style text for a theme role; plain text when the stream shows no colors |
role, color | the style function of an application's own role; one-off color and attributes |
Color, Ansi, parseColor, TextStyle | palette, indexed and RGB colors, degraded to what the terminal shows; colors and attributes of a role |
Theme, theme, defaultTheme, darkTheme, lightTheme, autoTheme, parseTheme, loadTheme | role styles, the current theme, shipped themes, themes from TOML |
input, password | read a line; read a line from the terminal without echo, as a Secret<string> |
readKey, Key, KeyCode | one key press, with an optional wait |
keyReleases, KeyAction | keys reported as they go down, repeat and come up (Key.action), on terminals with the kitty keyboard protocol |
drawImage, imageProtocol, ImageProtocol | a std.formats.image Image drawn at the cursor, fitted into a number of cells, on terminals with the kitty graphics protocol or iTerm2 inline images; false on the others |
supports, Feature | asks the terminal whether it knows a protocol: extended keys, synchronized output, bracketed paste, the mouse, mouse moves |
readEvent, Event, EventKind | a key press, a resize of the terminal window, pasted text or a mouse report |
bracketedPaste, mouse, Mouse, MouseButton, MouseAction | pastes as one event; mouse presses, releases, drags and the wheel |
extendedKeys, synchronizedOutput, mouseMoves | unambiguous keys (kitty keyboard protocol), a redraw shown at once, pointer moves with no button held |
copy, clipboard | text to and from the system clipboard through the terminal (OSC 52) |
render | a std.formats.docs Document (Markdown, HTML, …) laid out for the terminal: wrapped text, lists, boxed tables, with the theme's styles and clickable links |
raw, alternateScreen, showCursor | terminal modes, switched on and off; put back however the program ends |
moveTo, clear, clearLine | cursor and screen control |
Colors follow NO_COLOR, FORCE_COLOR, CLICOLOR_FORCE, TERM and COLORTERM.
std.cli.prompts
ask | a line of text, with a fallback and a validation that keeps the question open |
text | text of several lines: Enter starts a line, Ctrl+D ends the text |
secret, date, file | a line shown as dots; a date; a file picked by walking folders, optionally only files of given extensions, dot files on request |
confirm | a yes-or-no question |
choose, chooseMany | one or several choices from a list the arrow keys move in and typing narrows |
spinner, Spinner | a turning mark beside a label while work runs: label, log (a line written above it), done, failed |
progress, Progress | a bar that fills as steps are reported: advance, update, log, done, failed |
Cancelled | the error a question fails with on Escape or Ctrl+C |
Questions are asked key by key on a terminal; with input or output redirected each answer is read as a line.
std.metrics
Counter, Gauge, Histogram, Toggle | metrics (Metric) |
Distribution | a histogram's counts by range, from Histogram.distribution(); Histogram.last() is the newest sample |