std — API Documentation v0.2.32

Project Modules

allocator

Memory allocation abstractions and global allocator interface.

2 fn · 2 type · 1 const

assert

Runtime assertion and panic functions.

5 fn

build

Declarative build API for Yo projects.

13 fn · 16 type · 2 const

env

Process environment: command-line arguments, environment variables,

8 fn · 1 const

error

Standard error handling types and traits for Yo.

1 fn · 5 type · 1 trait

gc

Garbage collection interface for cycle collection.

2 fn

glob

Glob pattern matching for file paths.

1 fn · 1 type

hash

Hashing — the Hasher implementations behind the prelude's Hash trait

2 fn · 3 type · 2 const

log

Structured logging — level-filtered, optionally timestamped and

27 fn · 2 type · 1 trait

math

Floating-point mathematics — the Yo-level surface over libc/math.

path

Cross-platform filesystem path manipulation.

2 fn · 1 type · 2 const

prelude

Prelude — automatically imported into every Yo source file.

50 type · 31 trait · 878 const

rand

Non-cryptographic pseudo-random numbers — seedable, reproducible, fast

7 fn · 1 type

signal

High-level signal handling.

2 fn · 2 type

term

Terminal facade: TTY detection, terminal size, color-support detection and

6 fn · 2 type

thread

OS threads and a thread pool, each thread with its own Io event loop and

4 fn · 2 type

async/

async/channel

Async (event-loop) channel — deliver values BETWEEN TASKS on one thread's

4 type

async/index

Async task utilities — cooperative yield and JoinHandle combinators

7 fn · 1 type

async/mutex

Async (event-loop) mutex — a critical section that may SPAN AWAITS

1 type

async/stream

Async iteration — the Stream trait: "a value, later, repeatedly"

5 type · 1 trait

async/waker

Waker and park — the "resume THIS task" primitive.

2 fn · 2 type

cli/

cli/arg_parser

Command-line argument parsing.

2 type

collections/

collections/array_list

Dynamic array (vector) with amortized O(1) push and O(1) indexed access.

1 fn · 6 type

collections/btree_map

Sorted map backed by a sorted array with O(log n) lookup via binary

7 type

collections/deque

Double-ended queue (ring buffer) with O(1) push/pop at both ends.

3 type

collections/entry

The key/value entry shared by every map in the standard library.

1 type

collections/hash_map

Hash map with a SwissTable-style control-byte layout.

1 fn · 9 type

collections/hash_set

Hash set — a thin set-shaped view over HashMap(T, unit) (D16).

1 fn · 4 type

collections/linked_list

Doubly-linked list with O(1) push/pop at both ends.

4 type

collections/ordered_map

Insertion-ordered map.

6 type

collections/priority_queue

Binary MAX-heap priority queue — Rust's BinaryHeap (D11).

3 type

crypto/

crypto/crc32

CRC-32 (IEEE 802.3, reflected, polynomial 0xEDB88320) — the checksum

1 fn

crypto/digest

The streaming Digest trait — one interface over Sha256 / Sha512 /

1 trait

crypto/hmac

HMAC (RFC 2104) — generic over any Digest implementor

8 fn

crypto/md5

MD5 hash function (RFC 1321), pure Yo implementation.

2 fn · 1 type

crypto/random

Cryptographically secure random number generation.

6 fn · 1 type

crypto/sha1

SHA-1 (FIPS 180-4) — streaming hasher + one-shot helpers

2 fn · 1 type

crypto/sha256

SHA-256 hash function (FIPS 180-4), pure Yo implementation.

2 fn · 1 type

crypto/sha512

SHA-512 (FIPS 180-4) — streaming hasher + one-shot helpers

2 fn · 1 type

crypto/tls

TLS client streams over OpenSSL — plans/archive/D6_TLS_PLAN.md (the O2

1 fn · 2 type

encoding/

encoding/base64

Base64 encoding and decoding (RFC 4648) with standard and URL-safe variants.

12 fn

encoding/csv

CSV (RFC 4180) reader and writer.

10 fn · 3 type

encoding/error

Shared error type for the std/encoding codecs.

1 type

encoding/hex

Hexadecimal encoding and decoding.

6 fn

encoding/html

HTML entity decoding — named, decimal, and hexadecimal character references.

6 fn

encoding/html_char_utils

HTML character utility functions.

2 fn

encoding/html_entities

HTML5 named character references data.

2 fn

encoding/json

JSON parsing and serialization (RFC 8259).

21 fn · 3 type · 2 trait

encoding/percent

Percent-encoding (RFC 3986) — the URI component codec

6 fn · 1 type

encoding/toml

TOML v1.0.0 parsing and serialization.

4 fn · 4 type

encoding/utf16

UTF-8 to UTF-16 conversion and vice versa.

6 fn

encoding/utf8

UTF-8 primitives — the single decoder/encoder the rest of std is built on.

13 fn · 2 type

fmt/

fmt/format

The Format protocol — value.format(spec) (STD_API_AUDIT D3.10).

1 trait

fmt/index

Formatted output to stdout and stderr.

4 fn · 3 type · 3 trait

fmt/spec

Format specifications — the ${value:spec} vocabulary (STD_API_AUDIT D3.10).

1 type

fmt/to_string

ToString and Debug — the two rendering channels, and their impls for

2 trait

fs/

fs/dir

Async directory operations — create, remove, read, link, rename.

19 fn · 2 type

fs/file

Async file I/O operations with Exception-based error handling.

30 fn · 5 type

fs/metadata

File metadata via statx with ergonomic accessors.

5 fn · 1 type

fs/temp

RAII-managed temporary files and directories.

2 type

fs/types

File system types for open modes, permissions, and seek positions.

3 fn · 4 type

fs/walker

Recursive directory traversal.

7 fn · 2 type

fs/watch

File-system change notifications (fs.watch, plans/archive/STD_API_AUDIT.md §7 P1).

1 fn · 4 type

http/

http/client

Async HTTP client — fetch and fetch_with, shaped like JavaScript's

2 fn · 1 type · 2 const

http/http

HTTP core types — HttpMethod, StatusCode, HeaderMap, HttpRequest,

2 fn · 8 type

http/index

HTTP/1.1 — the module you import.

4 fn · 10 type · 3 const

http/server

Minimal HTTP/1.1 server on TcpListener (plans/archive/STD_API_AUDIT.md §7 P1).

1 type · 1 const

http/wire

HTTP/1.1 wire framing shared by std/http's client and server — header

6 fn · 2 type

imm/

imm/list

Persistent immutable singly-linked list with O(1) prepend, head, and tail.

3 type

imm/map

Persistent immutable hash map using a Hash Array Mapped Trie (HAMT).

8 type

imm/set

Persistent immutable hash set using a Hash Array Mapped Trie (HAMT).

1 type

imm/sorted_map

Persistent immutable sorted map using a left-leaning red-black tree.

3 type

imm/sorted_set

Persistent immutable sorted set using a left-leaning red-black tree.

1 type

imm/string

Immutable, thread-safe UTF-8 string type.

3 type

imm/vec

Immutable vector with O(1) indexed access — a flat copy-on-write array,

3 type

io/

io/bufio

Buffered wrappers over ANY async Reader/Writer — the D5 generic

2 type

io/index

Async I/O traits — the D5 redesign (plans/archive/STD_API_AUDIT.md §D5).

1 fn · 2 trait · 1 module

io/stdio

Typed standard-stream handles — stdin() / stdout() / stderr()

3 fn · 3 type

libc/

libc/assert

C11 <assert.h> — assertion debugging facility.

3 fn

libc/ctype

C11 <ctype.h> — character classification and conversion functions.

14 fn

libc/darwin

Darwin-only C interface pieces (audit env row: vars()).

1 fn

libc/dirent

C11 <dirent.h> — directory entry operations.

4 fn · 2 type · 9 const

libc/dyld

macOS <mach-o/dyld.h> — dynamic linker interface.

1 fn

libc/errno

C11 <errno.h> — error handling constants and errno variable.

81 const

libc/fcntl

POSIX <fcntl.h> — file control options.

3 fn · 22 const

libc/float

C11 <float.h> — floating-point implementation limits.

31 const

libc/limits

C11 <limits.h> — implementation-defined limits for integer types.

19 const

libc/math

C11 <math.h> — mathematical functions and constants.

177 fn · 26 const

libc/signal

C11 <signal.h> — signal handling functions and constants.

5 fn · 1 type · 30 const

libc/stdatomic

C11 <stdatomic.h> — atomic operations and types.

34 fn · 39 type · 16 const

libc/stdint

C11 <stdint.h> — fixed-width integer types and limits.

29 type · 49 const

libc/stdio

C11 <stdio.h> — standard I/O functions.

46 fn · 3 type · 15 const

libc/stdlib

C11 <stdlib.h> — general utility functions.

46 fn · 4 type · 4 const

libc/string

C11 <string.h> — string and memory functions.

36 fn

libc/time

C11 <time.h> — date and time functions.

15 fn · 4 type · 3 const

libc/unistd

POSIX <unistd.h> — standard symbolic constants and types.

24 fn · 5 type · 8 const

libc/wctype

C11 <wctype.h> — wide character classification and conversion functions.

14 fn

libc/windows

Windows-specific C API bindings.

9 fn · 3 type · 2 const

libc/sys/

libc/sys/stat

POSIX <sys/stat.h> — file status and mode operations.

8 fn · 1 type · 23 const

net/

net/addr

Network address types — IpAddr (v4 / v6) and SocketAddr (an address

2 type

net/dns

Name resolution — getaddrinfo behind typed lookup functions.

2 fn

net/errors

The network error type — NetError, the payload every throw in

1 type

net/tcp

Async TCP networking — typed TcpListener and TcpStream objects over

2 fn · 4 type

net/udp

Async UDP networking — a typed UdpSocket over std/sys/udp for

1 type

net/unix

Unix domain sockets — UnixListener / UnixStream

2 type

process/

process/command

High-level child-process spawning with builder-style configuration.

8 type

process/index

Process information: platform/arch detection, child-process spawning, and exit.

1 fn · 8 type · 4 const

regex/

regex/compiler

NFA compiler — compiles a RegexNode AST into a flat list of NFA instructions

3 type

regex/error

Typed error for std/regex pattern and flag compilation.

1 type

regex/flags

Regex flags parsing and representation.

1 type

regex/index

Regular expression engine with an NFA-based virtual machine.

4 type

regex/match

Match result type — represents the result of a regex match,

1 type

regex/node

Regex AST node types.

3 type

regex/parser

Regex pattern parser — parses a regex pattern string into an AST

1 type

regex/unicode

Unicode property ranges for `\p{...

1 fn

regex/vm

NFA virtual machine (Thompson simulation).

1 type

spec/

spec/numeric

EXPERIMENTAL — not covered by the std stability promise (audit spec/

6 type

spec/refine

EXPERIMENTAL — not covered by the std stability promise (audit spec/

4 type

string/

string/index

String and Unicode types.

12 type · 2 trait

string/rune

Unicode code point type (rune) for representing individual characters.

1 type

string/string

Growable UTF-8 strings: String, its four iterators, and the Pattern

9 type · 2 trait

string/string_builder

Mutable UTF-8 string builder for efficient incremental construction.

2 type

string/unicode

Unicode case conversion — locale-independent, table-driven.

4 fn

sync/

sync/atomic

High-level Atomic* wrappers for thread-safe shared mutable values.

1 fn · 12 type

sync/barrier

Reusable N-party barrier — the generation model, the same one Rust's

1 type

sync/channel

Bounded multi-producer multi-consumer (MPMC) channel.

4 type

sync/cond

Condition variable for thread synchronization.

1 type

sync/mutex

Mutual exclusion lock primitives.

2 type

sync/once

One-time initialization primitives.

2 type

sync/rwlock

Reader-writer lock allowing multiple concurrent readers or one exclusive

1 type

sync/semaphore

Counting semaphore — Dijkstra's P/V, the same model Java's

1 type

sync/waitgroup

Wait for a group of tasks to complete, similar to Go's sync.WaitGroup.

1 type

sys/

sys/advise

Kernel access-pattern hints (posix_fadvise/madvise) — the raw syscall

2 fn · 11 const

sys/clock

High-resolution clock reads (clock_gettime) — the raw syscall boundary.

1 fn · 2 const

sys/constants

File-system constants — the numeric flag values std/fs passes to the

54 const

sys/copy

File copy and zero-copy transfer — the raw syscall boundary.

2 fn

sys/dir

Directory operations.

12 fn

sys/dns

DNS resolution operations.

17 fn

sys/errors

IoError type — comprehensive I/O error type with errno-to-error mapping.

1 type

sys/events

Event-loop handles — TTY modes, fd polling and filesystem watches.

8 fn · 4 type · 12 const

sys/externs

Extern C runtime function declarations.

sys/fallocate

File space pre-allocation (fallocate) — the raw syscall boundary.

1 fn · 3 const

sys/fcntl

Descriptor flags (fcntl F_GETFL/F_SETFL/F_GETFD/F_SETFD) — the raw

4 fn · 2 const

sys/file

Async and sync file operations.

13 fn

sys/future

IoFuture — the opaque handle every async I/O extern hands back.

1 type

sys/iov

Scatter/gather I/O (readv/writev) — the raw syscall boundary.

6 fn

sys/lock

Advisory file locking (flock) — the raw syscall boundary.

1 fn · 4 const

sys/mmap

Memory-mapped I/O (mmap/munmap/mprotect/msync) — the raw syscall

6 fn · 10 const

sys/path

Path canonicalization (realpath) — the raw syscall boundary.

1 fn

sys/perm

File permissions, ownership and access checks — the raw syscall boundary.

5 fn

sys/pipe

Pipes and descriptor duplication — the raw syscall boundary.

3 fn

sys/process

Child process spawning and reaping — the raw syscall boundary.

6 fn

sys/seek

File position control (lseek) — the raw syscall boundary.

1 fn · 3 const

sys/signal

Signal registration and delivery — the raw syscall boundary.

3 fn · 1 type

sys/signals

POSIX signal numbers, as plain integers for std/sys/signal's

27 const

sys/socket

Socket constants and sockaddr sizes — the numbers std/net passes to

4 fn · 40 const

sys/socketpair

Connected socket pair (socketpair) — the raw syscall boundary.

1 fn

sys/sockinfo

Socket address and option queries — the raw syscall boundary.

4 fn

sys/statfs

Filesystem statistics (statvfs) — the raw syscall boundary.

9 fn

sys/statx

Statx — a typed view over the platform's stat buffer.

1 type

sys/sysinfo

System identification (uname/gethostname) — the raw syscall boundary.

2 fn · 7 const

sys/tcp

Async TCP sockets — the raw syscall boundary.

25 fn · 1 type

sys/temp

Temporary file and directory creation — the raw syscall boundary.

2 fn

sys/time

File timestamp updates (utime/futime/lutime) — the raw syscall

3 fn

sys/timer

Async sleep (sleep) — the raw timer boundary.

1 fn

sys/tty

Terminal control (termios / Win32 Console) — the raw syscall boundary.

5 fn · 1 type · 3 const

sys/udp

Async UDP sockets — the raw syscall boundary.

9 fn

sys/umask

Process file-creation mask (umask) — the raw syscall boundary.

1 fn

sys/unix

Async Unix-domain sockets — the raw syscall boundary.

12 fn · 1 type

testing/

testing/bench

Micro-benchmarking utilities.

3 fn · 1 type

time/

time/datetime

Wall-clock date and time, either in UTC or at a FIXED offset from it.

2 type

time/duration

Duration type representing a span of time with nanosecond precision.

1 type

time/instant

The two clocks: Instant (monotonic, for measuring elapsed time) and

3 type · 1 const

time/sleep

Sleeping — one async form and one blocking form, both taking a Duration.

3 fn · 1 type

url/

url/index

URL parsing and formatting per RFC 3986 (simplified).

2 type