std

library std

Modules

std::deflate

Deflate (RFC 1951) and gzip (RFC 1952): inflating what a server or a PNG compressed, its Huffman codes looked up nine bits at a time, and compressing what a program writes about as zlib's best level does (repeats found through chains of hashes and looked for again a byte on, blocks of their own Huffman codes).

std::dispose

Values that must be released by a call, not only freed.

std::equal

Equality: the Equal interface.

std::ffi

Values C holds for Alloy (LANGUAGE_SPEC.md section 6.3): a C library that calls back through an extern (...) -> R function often passes along a void * its caller gave it. c_pointer is that pointer: made from a reference, read back as one by the callback, which names the type it was made from.

std::float_digits

The shortest decimal digits of a float that read back to the same value, by Ryu (Ulf Adams, "Ryu: fast float-to-string conversion", PLDI 2018), which std::format writes floats with (LANGUAGE_SPEC.md section 6.5). Integer arithmetic only, so compile-time code formats floats too.

std::format

Formatting values as text: the Format interface.

std::fs

The file system: directories, paths and what is at them.

std::hash

Hashing: the Key interface of hash map keys.

std::http

HTTP/1.1 requests (alloy-ui's decisions/F12.md, "Network in std"): a client in Alloy over std::net and, for https://, std::tls. send waits for the whole response on whichever task calls it, and another task may follow or cancel an exchange through its Control.

std::io

Console and file input/output.

std::iterable

The iteration interfaces driving for loops.

std::json

JSON values (RFC 8259): parsing, writing, reading and building.

std::language_data

Generated by cldr/generate.alloy from CLDR 48 (cldr-json 48.0.0): do not edit. std::languages reads it.

std::languages

The system's languages and which way a language is written, apart from std::locale so that a program asking only these loads none of CLDR's locale tables (alloy-ui's REFOCUS.md, R6e): what an app's language and direction are chosen by.

std::locale

Locales: a language and region and how they write dates, times, numbers and prices, from CLDR 48's data (alloy-ui's decisions/F12.md, F12e, questions 11A to 14A), the same on every target: the tables of locale_data.alloy, which cldr/generate.alloy writes from the pinned release cldr/fetch.sh fetches. Every locale CLDR gives modern coverage is there, regional ones as their differences.

std::locale_data

Generated by cldr/generate.alloy from CLDR 48 (cldr-json 48.0.0): do not edit. std::locale reads it (Part there gives the fields' numbers).

std::macros

The built-in compile-time macros (LANGUAGE_SPEC.md section 7.4).

std::map

The hash map.

std::math

Mathematics over floats (LANGUAGE_SPEC.md section 6.1a).

std::net

TCP connections: a listener accepts connections on IPv4, and a connection reaches a host by its name, IPv6 or IPv4; each is read and written as bytes, through the compiler's al_sys_* functions, one C file a platform (alloyc/src/support/system.c). Natively only: the interpreter has no sockets, and WASI preview 1 opens none.

std::number

The numeric constraint interface.

std::option

The optional value: a payload (Some) or its absence (None).

std::process

The running process's environment.

std::random

Pseudo-random numbers: xoshiro256** (Blackman and Vigna), fast and statistically strong, not for secrets.

std::result

The outcome of something that may fail: a value (Ok) or the error that took its place (Err).

std::sha256

SHA-256 (FIPS 180-4), which the package registry checks files with.

std::sort

Sorting in place.

std::storage

Stores that persist: small sets of JSON values by key that a program keeps across its runs, such as its settings, a basket or recent searches. A store is read whole when opened and kept in memory, so reading never waits; it is meant for up to about a megabyte, and larger data goes into files of its own.

std::string

The owned, growable byte string.

std::sync

What tasks share (LANGUAGE_SPEC.md section 5.6).

std::testing

Expectations for tests (LANGUAGE_SPEC.md section 6.5).

std::text

Searching and parsing byte text.

std::time

Time: a monotonic clock for measuring, the wall clock, sleeping, and the calendar: days of the proleptic Gregorian calendar, times of day and the system's offset from UTC; time zones by name from the platform's database, dates and times on a zone's clocks, and ISO 8601, RFC 3339 and HTTP dates (F12e, notes at the end).

std::tls

TLS 1.2 and 1.3 over a TCP connection (std::net), client or server: Mbed TLS behind the compiler's src/support/tls.c, which a native program links only when it reaches this module (lib/<target>/tls.a; Mbed TLS is Apache-2.0, its notice in lib/<target>/mbedtls-LICENSE). ECDHE over X25519, P-256 and P-384, AES-GCM and ChaCha20-Poly1305, RSA and ECDSA certificates.

std::url

URLs as HTTP takes them (RFC 3986's subset scheme://host:port/path?query): parsing one, resolving a reference against one (a link, a redirection's Location), percent-encoding a query component and building a query.

std::vector

The growable array.

std::web

The browser's side of a web-wasm32 program, whose event loop is the browser's: the program sets up what the browser calls back, such as animation frames and input events, then lets main return while it keeps running. Externs a module declares come from the JavaScript beside it, <module>.web.js (section 6.3), as this module's do.