Std api
Every public declaration of the packaged library, with its bounds, the comment above it and the effect row the checker infers, one page per module. library.md is the guide to what each is for.
| module | what it holds |
|---|---|
| std.arena | A generational arena: values live in one owned array and are named by a copyable Handle instead of a borrow, which is how CAIRN expresses graphs and cycles. |
| std.core | The vocabulary every other module shares, and the limits of each integer type. |
| std.derived | Implementations written once for any record whose fields already have them: derive eq for Point;, derive ord for Point;, derive hash for Point;. |
| std.draw | Drawing into an Image on the CPU: filled rectangles, lines, filled circles, source-over blending, blits of one image onto another, text in a built-in 8 by 13 bitmap font, and the layout record and frame capture that let a person or an agent see what a program drew. |
| std.env | The program's arguments and environment, as it was started. |
| std.fmt | Text built into a byte Vec: each call appends to out, so a line is a run of calls and one write. |
| std.fs | Files by path. |
| std.image | RGBA images held in one owned array of pixels, and the files that hold them: PNG, which every viewer opens, and the plain PPM. |
| std.io | Files and standard streams. |
| std.map | An open-addressed hash table with linear probing and tombstones. |
| std.math | The C math library's functions on f64. |
| std.mem | Element-wise bulk operations on host views. |
| std.net | Blocking TCP over the C library. |
| std.sort | In-place ordering. |
| std.sys | The C library, declared exactly once: every other module borrows these names instead of redeclaring them, because an extern's C symbol is its CAIRN name and two declarations of one symbol collide in the emitted program. |
| std.text | Numbers to bytes and back, the ASCII class of a byte, and the searching a line protocol needs. |
| std.time | Clocks and waiting. |
| std.vec | A growable owner. |
| std.wire | |
| std.zlib | The system zlib through its one-shot C interface: the zlib stream of a whole view, and the CRC-32 and Adler-32 checksums that PNG files and zlib streams carry. |