Pudu programming language
Menu
All documentation pages

Documentation

Standard library

Author
Chris M. Pérez Santiago
Version
0.1.0
Source
Edit this page on GitHub

The standard library ships with the compiler. Every module lives under Std, nothing is imported implicitly, and a program imports exactly what it uses. This page is a map; the API reference documents every public declaration.

Core values

ModuleFor
Std.Optionworking with values that may be absent
Std.Resultworking with work that may fail
Std.Texttext: searching, splitting, numbers from text
Std.Charsingle characters
Std.Mathnumeric functions
Std.Decimalexact decimal arithmetic and rounding
Std.Fmtformatting values as text

Collections

ModuleFor
Std.Listoperations on arrays: sorting, grouping, searching
Std.Mapordered maps
Std.Setordered sets
Std.Itersequences a for loop can walk
Std.Deque, Std.Heapqueues and priority queues

Input, output, and the system

ModuleFor
Std.Iostandard input and output, files, streaming readers
Std.Fsatomic writes, temporary files, permissions, metadata
Std.Pathbuilding and taking apart file paths
Std.Envarguments, environment variables, the clock
Std.Processstarting other programs and talking to them
Std.Timedates, times, and durations

Data formats

ModuleFor
Std.JsonJSON documents and JSON Lines
Std.CsvCSV, read one record at a time
Std.Toml, Std.Yaml, Std.Xmlconfiguration and document formats
Std.Regexregular expressions with a step limit
Std.Bytesbinary data, hex, and base64

Networking and the web

ModuleFor
Std.Http.Serveran HTTP server with routing, limits, and graceful shutdown
Std.Http.Clientan HTTP client with verified TLS, redirects, and deadlines
Std.HtmlHTML built as values, escaped by construction
Std.Urlparsing and building URLs
Std.Net, Std.Tlssockets and verified TLS connections

Applications and databases

ModuleFor
Std.Appan application as a value: settings, stages, health checks
Std.App.Databasea database resource for SQLite or PostgreSQL
Std.Db.Migratenumbered schema migrations that run once
Std.Db.Storekeeping a program's own values in a table
Std.Cryptohashes, message authentication, and encryption

Testing

ModuleFor
Std.Testtest suites that pudu test discovers and runs
Std.Benchmeasuring how long code takes

Reading the reference

Every declaration in the API reference shows its signature and its documentation. You can also search by type shape from the home page: searching Str -> UInt32 finds functions that take text and return a 32-bit number.