Skip to content
English

Standard library

Current documentationSupport & limitations ↗

The standard library ships with Ku. Import modules through std; no separate package installation is required. Each reference describes interfaces, return values, errors and examples.

Module Purpose
string Unicode strings, search, slicing and replacement
array Array access, composition and mapping
object String-keyed objects, fields and defaults
json JSON encoding, decoding and dynamic values
Module Purpose
fs UTF-8 file I/O and directory listings
time Timestamps, dates, formatting, durations and waiting
config .env and YAML configuration
http HTTP clients, routes, requests and responses
bytes Binary buffers
net TCP and TLS clients
Module Purpose
pg / redis / mysql Database clients, pools and detached results
lexer / parser Lexer and parser debugging summaries
import json from "std.json"
import { http, time } from "std"

Examples import their dependencies explicitly. Databases, bytes and net currently require native C. See each module and the support matrix for backend availability.

T! is a Result that may contain an Error. Propagate it with ? or handle it with try/catch. An & parameter borrows read-only without consuming or implicitly copying its input. Allocating a new output string or array is separate from copying an input.

Browse the task-oriented examples or learn to write your own library in packages and modules. std.task is an internal observation interface; applications use async fn and await, described in the concurrency guide.