Gossamer standard library¶
One page per module. Source is crates/gossamer-std/src/; this index is regenerated from manifest::ALL_MODULES by gos doc --emit-stdlib.
| Module | Summary |
|---|---|
std::archive::tar |
Unix tar reader and writer (USTAR / PAX-aware decode). |
std::archive::zip |
ZIP archive reader and writer. |
std::bufio |
Buffered readers, writers, and line scanners. |
std::bytes |
Byte buffers, builders, and slice helpers. |
std::collections |
Built-in container types. |
std::collections::deque |
Double-ended queue over Vec |
std::collections::heap |
Binary min-heap (priority queue) over Veclet h = heap::push(h, v). |
std::collections::ordered_map |
Sorted key/value map (i64 -> i64) backed by a flat pair Vec. Re-bind on every mutator. |
std::collections::ordered_set |
Sorted set of i64 with binary-search lookups. Re-bind shape on every mutator. |
std::collections::ordered_vec |
Sorted-on-insert Vec |
std::collections::queue |
FIFO queue over Veclet q = queue::push(q, v). |
std::collections::stack |
LIFO stack over Veclet s = stack::push(s, v). |
std::compress::bzip2 |
bzip2 encoder / decoder (BZh format). |
std::compress::flate |
Raw DEFLATE (RFC 1951) encoder / decoder. |
std::compress::gzip |
gzip encoder / decoder (RFC 1952; flate2-backed). |
std::compress::zlib |
zlib (RFC 1950) encoder / decoder. |
std::compress::zstd |
Zstandard encoder / decoder (RFC 8478; libzstd-vendored). |
std::context |
Request-scoped cancellation, deadlines, and timeouts. |
std::crypto::aead |
Authenticated encryption with associated data. |
std::crypto::blake3 |
BLAKE3 hashing. |
std::crypto::cipher |
AES key handling + CBC / CTR block-cipher modes. |
std::crypto::ecdsa |
ECDSA over the NIST P-256 curve. |
std::crypto::ed25519 |
Ed25519 digital signatures. |
std::crypto::hmac |
HMAC-SHA-256 keyed MACs. |
std::crypto::insecure |
Legacy / broken hashes (MD5, SHA-1). Compat only — never use for new code. |
std::crypto::kdf |
Password-based key-derivation functions. |
std::crypto::password |
Argon2id password hashing facade: PHC-string hash / verify / re-hash policy. |
std::crypto::rand |
Secure random bytes from the host CSPRNG. |
std::crypto::sha256 |
SHA-256 hashing. |
std::crypto::sha512 |
SHA-512 hashing. |
std::crypto::subtle |
Constant-time comparison helpers. |
std::crypto::x509 |
X.509 certificate parsing. |
std::database::sql |
Driver-pluggable SQL database access. No driver ships in the box; bring your own (Postgres, MySQL, SQLite, ...) by registering one at startup. |
std::encoding::ascii85 |
ASCII85 / base85 encode / decode. |
std::encoding::base32 |
RFC 4648 base32 (uppercase) encode / decode. |
std::encoding::base64 |
RFC 4648 base64 encode/decode. |
std::encoding::binary |
Big/little-endian integer packing and varint codecs. |
std::encoding::csv |
CSV record reader and writer. |
std::encoding::hex |
Lowercase hex encode/decode. |
std::encoding::json |
JSON parser, emitter, and derive support. |
std::encoding::pem |
PEM block encoder and decoder. |
std::encoding::toml |
TOML 1.0 parsing + emission. Pair with <Type>::from_toml for typed decoding (struct auto-derive). |
std::encoding::xml |
Streaming XML decoder + builder (quick-xml). |
std::encoding::yaml |
YAML 1.2 parser/emitter (serde_yaml-backed). |
std::env |
Process environment, command-line arguments, working directory. |
std::errors |
Error construction, wrapping, and chain traversal. |
std::flag |
Batteries-included CLI argument parsing. |
std::fmt |
Formatted printing and string interpolation. |
std::fs |
Filesystem reading, writing, and traversal (Rust std::fs shape). |
std::hash::fnv |
FNV-1a non-cryptographic hash (32-bit, 64-bit). |
std::html::template |
Context-aware HTML templates with auto-escape. |
std::http |
HTTP/1.1 and HTTP/2 client and server. HTTP/2 negotiates via ALPN over TLS automatically (Go-style); h2c entry points are explicit. |
std::http::chunked |
RFC 7230 §4.1 chunked transfer-encoding reader and writer. |
std::http::cookie |
RFC 6265 cookie parser and Set-Cookie builder. |
std::http::csrf |
Double-submit-cookie CSRF protection with Origin / Referer allowlist. |
std::http::form |
application/x-www-form-urlencoded parser and builder. |
std::http::health |
Liveness / readiness probes for HTTP health endpoints. |
std::http::middleware |
Composable middleware: logger, recoverer, request_id, cors, basic_auth, compress_gzip. |
std::http::multipart |
RFC 7578 multipart/form-data streaming parser. |
std::http::native_client |
Goroutine-driven HTTP/1.1 client over std::net (no ureq, no blocking pool). |
std::http::proxy |
Reverse proxy on top of http::Client. Director-style request mutator + hop-by-hop strip + error handler. |
std::http::query |
Typed wrapper over URL query strings. |
std::http::router |
Go 1.22-class ServeMux: method-aware path patterns with parameter captures + prefix routes. |
std::http::session |
Signed-cookie session store with pluggable backend trait. |
std::http::sse |
Server-Sent Events (text/event-stream) emitter with heartbeat ticks and retry hint. |
std::http::state |
Handler-side dependency injection via a typed AppState. |
std::http::static_files |
Caching static-file handler: ETag, Last-Modified, byte ranges, MIME sniff. |
std::http::websocket |
RFC 6455 WebSocket support. Server-side accept + send_text / send_binary / ping / pong / close. |
std::http_h3 |
First-party HTTP/3 server + client over QUIC (RFC 9114; quinn + h3). Each serve and Client instance owns a private tokio runtime; callers see only synchronous entry points. |
std::io |
Stream-oriented I/O abstractions. |
std::iter |
Sequence adapters over Vec |
std::jwt |
RFC 7519 sign / verify for HS256 / HS384 / HS512, ES256, and EdDSA tokens. |
std::lifecycle |
Graceful-shutdown coordinator with signal handling and sd_notify support. |
std::log |
Flat line-oriented logging (Go's log shape). |
std::math |
Mathematical constants and f64 functions (Go's math package shape). |
std::math::big |
Arbitrary-precision integers (num-bigint). |
std::math::bits |
Integer bit-manipulation operations (Go's math/bits shape). |
std::math::rand |
Deterministic pseudo-random number generation. |
std::metrics |
Prometheus-compatible primitives (Counter, Gauge, Histogram) and a Registry rendering the standard text-exposition format. |
std::mime |
RFC 2045 media type parsing, parameter extraction, and extension lookup. |
std::net |
TCP/UDP networking primitives. |
std::net::netip |
Typed IP-address parsing, classification, and addr:port helpers (Go's net/netip shape). |
std::net::url |
URL parsing, rendering, and query escaping. |
std::option |
Data-last Option combinators for pipeline chaining: map, filter, default, and_then, etc. |
std::os |
Operating-system identity and deprecated re-exports of env/process/fs. |
std::os::exec |
Spawn / wait for child processes (Go's os/exec shape). |
std::os::signal |
POSIX-style signal subscription (Go's os/signal shape). |
std::os::user |
POSIX user / group lookup. Unix-backed by nix; Windows falls back to env vars. |
std::panic |
Panic / catch_unwind integration. |
std::path |
POSIX-style path manipulation. |
std::path::native |
Native-separator wrappers over std::path (backslash on Windows). |
std::process |
Spawn child processes, exit the current process (Rust std::process shape). |
std::regex |
Compiled regular expressions (Rust regex crate syntax; no backreferences or look-around). |
std::result |
Data-last Result combinators for pipeline chaining: map, map_err, default_with, etc. |
std::runtime |
Goroutine / GC / scheduler introspection and tuning. |
std::slog |
Structured, levelled logging. |
std::sort |
Slice sorting and binary search. |
std::strconv |
Conversions between strings and primitive numeric types. |
std::strings |
Polished String operations. |
std::sync |
Synchronisation primitives beyond channels. |
std::testing |
Assertions and sub-test harness helpers. |
std::text::template |
Plain-text templates (no escaping). |
std::thread |
Native OS threads. For goroutines use the go expr syntax. |
std::time |
Wall-clock and monotonic time facilities. |
std::tls |
TLS termination and TLS client dialling (rustls-backed). Wired through both http::Server::bind_and_run_tls and http::Client; mTLS / ALPN / SNI exposed. |
std::trace |
W3C trace-context-compatible distributed tracing. Identifier types, request-scoped SpanContext, process-level Tracer, and OTLP JSON export. |
std::unicode |
Unicode general-category predicates, casing, normalization, and segmentation. |
std::utf16 |
UTF-16 encoding/decoding and surrogate pair helpers. |
std::utf8 |
UTF-8 validation and scalar decoding. |
std::uuid |
UUID v4 (random) and v7 (timestamp-ordered) generation, parse, and normalize. |
std::validate |
Trait-based field validation: implement Validate, collect FieldErrors into Errors. |