Standard Library

Current standard library module inventory, stability, public exports, and internal modules.

This is the current std module inventory. It lists module-level exports and re-exports from lib/std/**/*.zx; methods on exported types are documented in the module-specific pages linked from this section.

Stability labels:

  • mvp: normal source may import this module under the documented current contract.
  • internal: implementation support for stdlib/compiler code, not a user API.
  • experimental: reserved for future stdlib modules behind an explicit experimental boundary. No current lib/std module is experimental.

Removed modules:

  • std.task: removed from the source and SDK surface. Use std.future.

The mvp label is a current-docs classification, not a released stability badge. Zynx is still 0.0.0-dev, so even mvp modules may change before a beta or tagged release.

Async Surface

The public async module is std.future. Async calls return future.Future<T> values, and structured concurrency uses future.all, future.race, future.timeout, and future.Group<T, E>. std.task is not part of the current source or SDK surface.

Module Inventory

ModuleStabilityPublic TypesPublic Functions, Values, And Re-exportsPublic ErrorsNotes
stdmvpnonecopy, move, drop, iternoneAuto-preluded root helper namespace. This does not auto-import std submodules. move and drop are compiler-recognized ownership operations; iter is the minimal slice/array iterator entry point.
std.aiomvpReader, Writer, Stream, DescriptorReader, DescriptorWriter, DescriptorStreamwrite, read, stdin, stdout, stderrIOErrorAsync descriptor adapters. Descriptor wrappers borrow file descriptors and operations return Future values that throw IOError.
std.allocatormvpAllocatornoneAllocErrorRaw allocation interface. Allocation failures are reported as AllocError.
std.arithmvpnonechecked, overflowing, saturating, wrappingnoneFacade for explicit integer arithmetic policy modules.
std.arith.checkedmvpnoneadd, sub, mulnoneChecked integer helpers return nullable results instead of trapping.
std.arith.overflowingmvpnoneadd, sub, mulnoneHelpers return result plus overflow flag.
std.arith.saturatingmvpnoneadd, sub, shlnoneHelpers clamp at numeric bounds.
std.arith.wrappingmvpnoneadd, sub, mulnoneHelpers perform explicit wrapping arithmetic.
std.bitmvpnoneswap_bytes, reverse_bits, count_ones, leading_zeros, trailing_zeros, rotate_left, rotate_rightnoneInteger bit operations.
std.builtininternalCopy, Integer, Signed, UnsignednoneDynamicErrorAuto-imported compiler surface. Marker interfaces and DynamicError are language-reserved, not ordinary user-extensible APIs.
std.bytesmvpBytesnonenoneNon-owning byte views over strings, String, and byte slices. Text validation is not implicit.
std.bytes.coremvpBytesnonenoneDefines the Bytes view type re-exported by std.bytes.
std.channelmvpRecv, Sender, ReceiverboundedChannelErrorBounded channels own buffered values. bounded is a runtime intrinsic, and cross-thread-capable sends require send-safe payloads.
std.collectionsmvpArray, HashMapnonenoneCollection facade. Growing owned collections may throw AllocError through their methods.
std.collections.arraymvpArrayIter, ArrayCopyIter, ArraynonenoneGrowable owned or borrowed array storage. Mutating growth operations may throw AllocError.
std.collections.hash_mapmvpHashBucket, HashMapnonenoneHash map storage. HashBucket is an implementation-shaped exported layout type, not a construction helper.
std.compressmvpnonedeflate, gzipnoneCompression facade. Public algorithms return io.MemoryStream for allocating helpers.
std.compress.deflatemvpFormatno_compression, best_speed, best_compression, default_compression, compress_bound, compress_into, decompress_into, compress, decompressCompressErrorDeflate and zlib helpers. Allocating helpers may also throw AllocError and io.IOError.
std.compress.gzipmvpnoneno_compression, best_speed, best_compression, default_compression, compress_bound, compress_into, decompress_into, compress, decompressCompressErrorGzip helpers. Allocating helpers may also throw AllocError and io.IOError.
std.compress.internal.zlib_ffiinternalnonez_no_flush, z_finish, z_ok, z_stream_end, z_need_dict, z_stream_error, z_data_error, z_mem_error, z_buf_error, z_version_error, max_chunk, compress_bound, deflate_init, inflate_init, deflate_step, inflate_step, deflate_end, inflate_end, raiseCompressErrorInternal zlib ABI shim for compression modules. Not a 0.0.0-dev user API.
std.cryptomvpnonesecure_zero, box, errors, hash, password, random, secretbox, signCryptoErrorCrypto facade. Key-owning types zero secret storage on drop where implemented.
std.crypto.boxmvpPublicKey, SecretKey, Seed, Nonce, KeyPairpublic_key_bytes, secret_key_bytes, seed_bytes, nonce_bytes, mac_bytes, seal_overhead, seal_into, open_into, seal, openCryptoErrorPublic-key authenticated encryption. Allocating helpers may also throw AllocError.
std.crypto.errorsmvpnonenoneCryptoErrorShared crypto error set.
std.crypto.hashmvpnoneblake2bnoneHash facade.
std.crypto.hash.blake2bmvpDigest, Keybytes_min, bytes_max, bytes, key_bytes_min, key_bytes_max, key_bytes, sum_into, sum_keyed_into, sum, sum_keyedCryptoErrorBLAKE2b hashing. Keyed helpers use owned key material.
std.crypto.internal.utilinternalnonestatus_ok, status_invalid, status_buffer, status_auth, status_random, status_resource, status_init, raise, secure_zero, alloc_bytes, copy_exactnoneInternal crypto support. Not a 0.0.0-dev user API.
std.crypto.passwordmvpnoneargon2idnonePassword-hashing facade.
std.crypto.password.argon2idmvpProfile, Saltsalt_bytes, str_bytes, bytes_min, bytes_max, opslimit_interactive, memlimit_interactive, opslimit_moderate, memlimit_moderate, opslimit_sensitive, memlimit_sensitive, hash_password, verify, needs_rehash, derive_key_intoCryptoErrorArgon2id password hashing and key derivation. Allocating helpers may also throw AllocError.
std.crypto.randommvpnonefill, uint32, uniformCryptoErrorCryptographic randomness.
std.crypto.secretboxmvpKey, Noncekey_bytes, nonce_bytes, mac_bytes, seal_overhead, seal_into, open_into, seal, openCryptoErrorSecret-key authenticated encryption. Allocating helpers may also throw AllocError.
std.crypto.signmvpnoneed25519noneSignature facade.
std.crypto.sign.ed25519mvpPublicKey, SecretKey, Seed, Signature, KeyPairpublic_key_bytes, secret_key_bytes, seed_bytes, signature_bytes, sign_into, sign, verifyCryptoErrorEd25519 signatures. Allocating helpers may also throw AllocError.
std.encodingmvpnonebase64, base64url, hexHexErrorText encoders and decoders over explicit byte views.
std.encoding.base64mvpnoneencode, encode_no_padnoneBase64 encoding returns UTF-8 String output.
std.encoding.base64urlmvpnoneencode, encode_no_padnoneURL-safe Base64 encoding returns UTF-8 String output.
std.encoding.hexmvpnoneencoded_length, decoded_length, valid, encode, encode_upper, encode_into, encode_upper_into, decode_into, decodeHexErrorHex encode/decode helpers. Allocating helpers may also throw AllocError.
std.envmvpnoneargs, getnoneProcess-environment helpers for CLI tools. The initial current development surface exposes borrowed process arguments and environment lookup.
std.fsmvpnoneread_file, write_filenoneMinimal filesystem convenience module. read_file reads validated String text; write_file creates or truncates a text file and writes the complete string.
std.futuremvpFuture, Task, Groupready, sleep, yield, readable, writable, all, race, timeoutAsyncErrorCompiler-recognized cold-future surface. Structured operations include child errors plus AsyncError where cancellation or timeout is represented.
std.hashmvpHashable, Hashercrc32, crc32c, fnv32a, fnv64anoneHash interfaces and algorithm facade. Interfaces are static-only constraints in the current language.
std.hash.crc32mvpCrc32sumnoneCRC-32 hasher and one-shot helper.
std.hash.crc32cmvpCrc32csumnoneCRC-32C hasher and one-shot helper.
std.hash.fnv32amvpFnv32anonenoneFNV-1a 32-bit hasher.
std.hash.fnv64amvpFnv64anonenoneFNV-1a 64-bit hasher.
std.iomvpReader, Writer, Stream, DescriptorReader, DescriptorWriter, DescriptorStream, MemoryStreamprint, println, eprint, eprintln, write, read, stdin, stdout, stderrIOErrorSynchronous byte I/O. Descriptor wrappers borrow descriptors. MemoryStream owns its backing buffer. CLI print helpers ignore low-level write status.
std.itermvpIterable, Iterator, SliceIter, IternonenoneMinimal iterator facade for array/slice-backed pipelines. Current working adapters cover next, next_or, skip, take, fold, any, all, and count; broader lazy adapters remain TODO.
std.iter.iterablemvpIterablenonenoneDefines the static Iterable constraint re-exported by std.iter.
std.jsonmvpValue, Token, Decoder, Encoderdecode, encode, null, boolean, string, number, array, objectJsonErrorStrict JSON decode/encode, typed decode<T> for supported targets and @derive(json) structs, token input decoding, mutable DOM values, and streaming output. Numbers are exposed as validated source text.
std.memmvpnonecopy, move, set, zero, compare, find, slice_of, owned_slice, is_owned, write_at, read_at, move_at, drop_at, str_from_raw, address_of, swapnoneLow-level memory helpers. Raw-pointer validity is the caller's responsibility and str_from_raw is unsafe.
std.netmvpnonedns, ipaddr, socket, tcp, udpNetErrorNetworking facade. DNS uses the host resolver and is not hermetic.
std.net.dnsmvpnoneresolvenoneAsync DNS resolution returning socket addresses. Uses io.IOError and AllocError.
std.net.errorsmvpnoneraise, raise_lastNetErrorPlatform network-error mapping helpers.
std.net.ipaddrmvpAddressFamily, Ipv4Addr, Ipv6Addr, IpAddr, SocketAddrfamily_code, addr_family_code, addr_port, addr_v4, addr_v6_hi, addr_v6_lo, socket_addr_from_rawnoneAddress parse/format values. The raw bridge helpers are exported for std.net submodules and are not the documented application API.
std.net.socketmvpSocketKind, Socketstream_kind_code, datagram_kind_code, local_addr_for, peer_addr_for, connect_fd, recv_ptr_fd, send_ptr_fd, write_fd, recv_from_fd, send_to_ptr_fd, bind_fd, bind_listen_fd, open_connected_fd, accept_fdnoneLow-level async socket layer. Raw bridge helpers are for std.net submodules; application code should use Socket methods and TCP/UDP wrappers.
std.net.tcpmvpTcpListener, TcpStreamnonenoneOwned TCP listener and stream wrappers. Stream I/O inherits std.io partial and EOF semantics.
std.net.udpmvpUdpSocketnonenoneOwned UDP socket wrapper. Datagram boundaries are preserved and short buffers truncate datagrams.
std.osmvpnonestdin, stdout, stderr, errno, exit, read, write, close, pipe, set_nonblocking, syncnoneLow-level OS descriptors and foreign C ABI calls. Prefer std.io or std.aio for normal I/O.
std.pathmvpnonebasename, dirname, extension, joinnoneLexical Unix-style path helpers. No filesystem access or normalization beyond join boundary separator handling.
std.stringmvpStringnonenoneOwned UTF-8 string. Construction from bytes validates text and growth may throw AllocError.
std.timemvpDurationns, us, ms, sec, to_nanosecondsTimeErrorDuration construction with checked unit conversion.
std.unicodemvpDecodeutf8, utf16leUnicodeErrorUnicode facade. Grapheme clusters and normalization are out of 0.0.0-dev.
std.unicode.utf16lemvpnonevalid, to_utf8_into, to_utf8UnicodeErrorUTF-16LE validation and UTF-8 conversion. Allocating conversion may throw AllocError.
std.unicode.utf8mvpDecodevalid, count, decode, encode, to_utf16le_into, to_utf16leUnicodeErrorUTF-8 validation, decoding, encoding, and UTF-16LE conversion. Allocating conversion may throw AllocError.