Skip to content

Standard Library

Run ships with a comprehensive standard library, comparable in scope to Go’s. It covers the most common tasks so you can build real applications without third-party dependencies.

Package Description
fmt String formatting and printing
strings String searching, splitting, joining
bytes Byte slice utilities
math Mathematical functions and constants
time Time, durations, and timers
Package Description
io Readers, writers, buffered I/O
os File system, processes, environment
log Structured logging
Package Description
net TCP/UDP sockets, DNS resolution
http HTTP server and client
Package Description
json JSON encoding and decoding
crypto Hashing, encryption, TLS
Package Description
sync Mutexes, atomics, wait groups
testing Built-in test framework
package main
use "http"
use "fmt"
fun handle(w: &http.ResponseWriter, r: @http.Request) {
w.write("Hello from Run!")
}
pub fun main() {
http.handlefn("/", handle)
fmt.println("listening on :8080")
http.listenAndServe(":8080")
}

The standard library is designed to be practical and unsurprising. When you need something common — reading a file, serving HTTP, encoding JSON — it is already there.