Standard library
The standard library ships with every Chloride installation (in the stdlib/ directory
next to the interpreter). Modules are imported by name:
import "json" as json
import "file" expose open, is_file
Most modules are written in Argon, with native C code for anything that needs the operating
system. See Modules and import for how imports work, and
note that a local file with the same name as a module (e.g. json.ar) takes priority over
the standard library.
| Module | Description |
|---|---|
term |
printing and reading from the terminal (global, no import needed) |
maths |
rounding, absolute value, min and max |
random |
random numbers |
path |
path manipulation |
file |
files, directories and the standard streams |
json |
JSON encoding and decoding |
date |
dates, times and formatting |
time |
sleeping |
regex |
regular expressions (PCRE2) |
network |
TCP and TLS sockets, and an HTTP/HTTPS client |
url |
URL encoding and query strings |
hex |
hexadecimal formatting |
threading |
threads and thread-local storage |
subprocess |
running other programs |
archive |
reading and writing tar, zip and other archives |
build |
compiling native extensions |