Standard library

Oak comes with a growing standard library for quickly writing scripts and building small apps. The standard library also serves as an example of what idiomatic Oak code looks like.

Oak's standard library is covered by the same stability guarantee as the rest of the language — after Oak 1.0, documented APIs in the standard library will not have breaking changes.

std core functions, iteration, and control flow
str functions for working with characters and strings
math mathematical constants and operators, algebraic functions, and utilities for working in 2D/3D
sort list sorting algorithms; currently quicksort
random functions for working with insecure, pseudorandom sources of randomness
fs ergonomic filesystem APIs for reading and writing to files and directories
fmt formatted printing using "{{ N }}"-style format strings
json JSON parser and serializer for Oak values
datetime utilities for working with human-readable dates and UNIX timestamps
path functions for working with UNIX style paths in file systems and URIs
http a toolkit for writing HTTP servers, routers, and services
test basic unit testing library, used by Oak's language and standard library tests
debug tools for inspecting runtime values, including a pretty-printer for structured data
cli a toolkit for writing command-line Oak apps, including a parser for CLI arguments
md Markdown parsing and rendering
crypto utilities for working with cryptographic primitives and cryptographically safe sources of randomness
syntax tokenizer, parser, and code formatter for the Oak language