Standard Library
Overview of the stdlib, how to import modules, and how to generate API docs.
Standard Library
Sounio’s standard library lives in stdlib/ in the repository. It provides core data structures, I/O, math, and domain modules (epistemic computing, scientific computing, etc.).
Current project scale (v0.100.0):
- ~215K lines in stdlib
- 76 modules
- Public inventory reference:
docs/STDLIB_REFERENCE.md
Importing Modules
Sounio supports both use and import forms (the parser accepts either in many cases).
Examples seen in tests and examples:
use math::*
import stdlib.math.*
Practical tip: when in doubt, search the repo for the module you want and copy the import form used there.
What to Read First
stdlib/core/:Option<T>,Result<T, E>, basic traitsstdlib/io/: console + filesystem APIsstdlib/math/: scalar math utilitiesstdlib/collections/:Vec, maps/sets (where available)stdlib/epistemic/:Knowledge<T>design + semantics
API Docs (Generated)
The repo includes a doc generator:
# Generate HTML docs for stdlib into a directory
cargo run --bin souniodoc -- generate stdlib --output website/public/api
Then serve the website and visit /api/.
Note: Generated files should usually be treated as build artifacts (do not commit unless you intentionally vendor them).