Stdlib (Selection)
This page is a library map, not a minimal snippet dump. The goal is to show the main families, the responsibilities they own, and the kinds of complete programs they support.
Complete Reference Atlas
The stdlib now has a wiki-style reference corpus aligned with the actual src/vitte/stdlib tree: one page per family, one page per file, and one SVG portrait per module in the same spirit as the keyword pages.
book/stdlib-reference/index.htmlfor the full atlas.book/compiler-stdlib-contract.htmlfor the compiler/runtime contract.
Library Families
- Core: types, strings, memory helpers, panic/runtime-adjacent basics, low-level algorithms.
- Collections: vector, deque, queue, stack, linked list, hashmap, hashset, graph, matrix.
- Data: dataset, schema, transform, merge, cleaning, statistics.
- Json and encoding: parse, builder, stringify, serialize, schema, utf, url, base64, hex, html.
- Path and io: manipulation, walkers, special locations, globbing, file, buffer, stream, stdio.
- Math: arithmetic, algebra, logic, geometry, trigonometry, probability, statistics, modular, matrix, vector.
- Crypto and compression: hashes, HMAC, random, symmetric/asymmetric primitives, huffman, lz, deflate, brotli.
- Async and threading: future, executor, channel, thread, mutex, threadpool.
- Kernel and ffi: process, scheduler, users, signals, device, memory, network, ABI-facing integration.
Complete Example
space demo/report
form Report {
name: string
root: string
status: int
}
pick Outcome {
case Ok(summary: string)
case Err(code: int)
}
proc normalize_root(root: string) -> string {
if root == "" { give "." }
give root
}
proc validate_report(r: Report) -> Outcome {
if r.name == "" { give Outcome.Err(11) }
if r.status < 0 { give Outcome.Err(12) }
give Outcome.Ok(r.name)
}
proc render_report(r: Report) -> string {
let normalized: string = normalize_root(r.root)
give "{name=" + r.name + ",root=" + normalized + ",status=ok}"
}
entry main at core/app {
let r: Report = Report("demo", "toolchain/stage2", 0)
return 0
}
This single example is enough to show where future stdlib families plug in: path for root normalization, json for serialization, io for file emission, collections for grouping reports, and async if generation becomes concurrent.
How To Read The Catalog
- Start from the responsibility of the code, not from the module name you happen to remember.
- Prefer pure families first:
core,strings,collections,data. - Move to host-facing families only when the problem genuinely touches files, processes, or runtime coordination.
- Keep bridge/kernel/ffi boundaries explicit because they carry the highest coupling cost.