Skip to content
Plumlang

Language reference · Section 13

The standard library

Modules are imported with seed. The 1.0 library is planned as:

Module Contents
math constants and functions on numbers, random numbers
string the methods of str (always available on strings)
list, map, set the methods of collections (always available)
io standard input and output, formatting
fs files and directories
os arguments, environment, processes, exit
time clocks, dates, durations, sleep
json parse and produce JSON, mapped to maps, lists and trees
net TCP and UDP sockets, TLS, DNS
net.http an HTTP and HTTPS server and client
test assertions and a test runner (plum test)

Each module is documented in docs/stdlib/ as it lands, and plum stdlib lists the functions of every module with their signatures. The methods of str are documented as the str page there. A web server, for a taste:

seed net.http

plant app = http.server()

app.get("/hello/:name", (req) => http.text("Hello, {req.params["name"]}!"))

app.listen(8080)

Each connection runs in its own task (section 12). docs/stdlib/net.http.md describes the server (routes with :params, middleware, static files) and the client (http.get, http.post_json, ...). Some standard modules, like net.http, are written in Plumlang and built into plum.