Skip to main content

Standard Library

The Nolang standard library (src/std/) contains 60+ modules, covering formatting, math, strings, data structures, encoding/decoding, encryption, compression, file operations, I/O abstractions, and more.

Usage: # std/xxx (core modules require no import).

The legacy use std/xxx syntax still works but is deprecated; the new # std/xxx syntax is recommended.

Note: All code examples in this document follow the "one statement per line" rule—using semicolons ; or commas , to put multiple statements on one line is forbidden. For example, out = from-i64(v), out = from-u64(v) is incorrect and should be split across multiple lines.

Reuse first, don't reinvent the wheel. When you need a capability, check the standard library first (the modules listed on this page; core modules need no import). If it's not there, use no search <keyword> to search nohub community packages, no info <pkg> for install/import commands, and no docs <pkg> for the documentation; add a good match with no add <tool>[:<version>]@<host>/<owner>/<repo> (use no install for a binary tool). Only write it yourself when neither covers the need.


Modules​