Hosted stdlib
Documented hosted compatibility modules for files, encoding, hashing, buffers, binary I/O, math and environment arguments.
API landing§
Start at API + STDLIB CATALOG when you need the full map of language, hosted compatibility, systems and platform surfaces. This page stays the symbol-level hosted module listing.
PROVENANCE: the supplied hosted language specification identifies itself as Public Alpha v7.8.0. The v12 contract explicitly retains legacy hosted compatibility types, but it does not restate this module catalog as a newly designed v12 standard library. Treat this as the documented hosted compatibility surface, not proof of an expanded v12 stdlib.
std.fs§
fs.read_text(path: str) -> str
fs.write_text(path: str, text: str) -> void
fs.read_bytes(path: str) -> bytes
fs.write_bytes(path: str, data: bytes) -> void
fs.exists(path: str) -> intstd.encoding§
enc.hex_encode(data: bytes) -> str
enc.hex_decode(text: str) -> bytesstd.hash§
hash.sha256(data: bytes) -> bytesstd.buffer§
buf.new(size: int) -> buffer
buf.from_bytes(data: bytes) -> buffer
buf.to_bytes(data: buffer) -> bytes
buf.len(data: buffer) -> int
buf.get(data: buffer, offset: int) -> int
buf.set(data: buffer, offset: int, value: int) -> void
buf.slice(data: buffer, offset: int, length: int) -> bytes
buf.load(path: str) -> buffer
buf.save(path: str, data: buffer) -> void
buf.find(data: buffer, pattern: bytes) -> int
buf.replace(data: buffer, offset: int, replacement: bytes) -> voidstd.binary reads§
bin.u8(data: bytes, offset: int) -> int
bin.i8(data: bytes, offset: int) -> int
bin.u16_le(data: bytes, offset: int) -> int
bin.u16_be(data: bytes, offset: int) -> int
bin.i16_le(data: bytes, offset: int) -> int
bin.i16_be(data: bytes, offset: int) -> int
bin.u32_le(data: bytes, offset: int) -> int
bin.u32_be(data: bytes, offset: int) -> int
bin.i32_le(data: bytes, offset: int) -> int
bin.i32_be(data: bytes, offset: int) -> intstd.binary writes§
bin.write_u16_le(data: buffer, offset: int, value: int) -> void
bin.write_u16_be(data: buffer, offset: int, value: int) -> void
bin.write_u32_le(data: buffer, offset: int, value: int) -> void
bin.write_u32_be(data: buffer, offset: int, value: int) -> voidstd.math§
math.abs(x: int) -> int
math.min(a: int, b: int) -> int
math.max(a: int, b: int) -> intstd.env§
env.args() -> list[str]built-ins§
print("hello")
print(len(b"abc"))The historical spec documents len() for str, list, bytes and buffer.
native boundary§
Privileged native.* operations are not this hosted stdlib. They are separately profile-gated and documented under native intrinsics.
SOURCE POLICY: release/tag documents define contracts; examples are copied from the supplied v12.0.0 package or explicitly marked as explanatory. Unsupported claims are not upgraded by prose.
Future portable std layer§
The proposed post-v12 direction keeps portable names such as std.fs, std.time, std.process, std.net and std.thread above OS-specific implementations. Linux/Windows namespaces remain explicit escape hatches, not canonical-HIR conditionals. This is historical roadmap design, not v12.0 API. The numbered roadmap is superseded; current target truth is the v12.2 modern-native release.