Standard library
Thor uses the standard library resolved by the selected zapc; it does not
copy the library into each project. For editor configuration or a custom tool,
the active compiler reports that directory with:
zapc --print-stdlib-pathCommon names such as println, StringView, List, and toString are
available through the automatic prelude. Import a module when
you need the rest of its API.
| Module | Purpose |
|---|---|
std/io | Terminal input and output |
std/string | String views, trimming, splitting, and building |
std/strings | Split and join lists of strings |
std/collection | Dynamic lists and string-keyed maps |
std/slice | Checked helpers for slices |
std/convert | Primitive conversions and integer parsing |
std/fs | Failable file and directory operations |
std/path | Parent, basename, and path joining |
std/process | Arguments, working directory, execution, and exit |
std/math | Basic integer and floating-point helpers |
std/random | Seeded PCG32 pseudo-random generation |
std/json | Early JSON object parser |
std/network | TCP-style streams, listeners, and raw socket wrappers |
std/error | A general structured error value |
std/mem | Unsafe C allocation functions |