library std
Modules
std::deflateDeflate (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::disposeValues that must be released by a call, not only freed.
std::equalEquality: the Equal interface.
std::ffiValues C holds for Alloy (LANGUAGE_SPEC.md section 6.3): a C library that calls back through an
extern (...) -> Rfunction often passes along avoid *its caller gave it.c_pointeris that pointer: made from a reference, read back as one by the callback, which names the type it was made from.std::float_digitsThe 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::formatFormatting values as text: the Format interface.
std::fsThe file system: directories, paths and what is at them.
std::hashHashing: the Key interface of hash map keys.
std::httpHTTP/1.1 requests (alloy-ui's decisions/F12.md, "Network in std"): a client in Alloy over std::net and, for
https://, std::tls.sendwaits for the whole response on whichever task calls it, and another task may follow or cancel an exchange through itsControl.std::ioConsole and file input/output.
std::iterableThe iteration interfaces driving
forloops.std::jsonJSON values (RFC 8259): parsing, writing, reading and building.
std::language_dataGenerated by cldr/generate.alloy from CLDR 48 (cldr-json 48.0.0): do not edit. std::languages reads it.
std::languagesThe 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::localeLocales: 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_dataGenerated 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::macrosThe built-in compile-time macros (LANGUAGE_SPEC.md section 7.4).
std::mapThe hash map.
std::mathMathematics over floats (LANGUAGE_SPEC.md section 6.1a).
std::netTCP 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::numberThe numeric constraint interface.
std::optionThe optional value: a payload (
Some) or its absence (None).std::processThe running process's environment.
std::randomPseudo-random numbers: xoshiro256** (Blackman and Vigna), fast and statistically strong, not for secrets.
std::resultThe outcome of something that may fail: a value (
Ok) or the error that took its place (Err).std::sha256SHA-256 (FIPS 180-4), which the package registry checks files with.
std::sortSorting in place.
std::storageStores 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::stringThe owned, growable byte string.
std::syncWhat tasks share (LANGUAGE_SPEC.md section 5.6).
std::testingExpectations for tests (LANGUAGE_SPEC.md section 6.5).
std::textSearching and parsing byte text.
std::timeTime: 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::tlsTLS 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::urlURLs 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::vectorThe growable array.
std::webThe browser's side of a
web-wasm32program, whose event loop is the browser's: the program sets up what the browser calls back, such as animation frames and input events, then letsmainreturn 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.