Standard Library Overview (ob:*)¶
All built-in Orbita modules are implemented in Rust, compiled directly into the ob binary, and imported via require("ob:<module>").
Module Catalog¶
| Module | Purpose | Required Permission |
|---|---|---|
ob:http |
HTTP/1.1 & HTTP/2 server (serve) and HTTP client (fetch) |
--allow-net |
ob:router |
Fullstack file-based & fluent router, middlewares, CSRF, sessions, validation | None |
ob:db |
Declarative SQLite ORM/DSL (table, find, where, join, transaction) |
--allow-read + --allow-write (disk files only) |
ob:cache |
Thread-safe in-memory KV cache with TTL, LRU eviction, remember, and HTTP/template caching |
None |
ob:config |
12-Factor runtime configuration (config.toml + HOST/PORT/ORBITA_DB env overrides) |
None |
ob:fs |
Read, write, list, and inspect files and directories | --allow-read / --allow-write |
ob:path |
Path helpers (join, dirname, basename, ext) |
None |
ob:env |
Environment variables and current working directory (cwd) |
--allow-env / --allow-read |
ob:process |
CLI arguments, subprocess exec, and exit |
--allow-run (exec only) |
ob:sqlite |
Bundled SQLite database (zero system dependencies) | --allow-read + --allow-write (disk files only) |
ob:json |
Fast JSON encoding/decoding via serde_json |
None |
ob:crypto |
sha256, hex_encode, random_hex, and Argon2id password hashing (hash_password / verify_password) |
None |
ob:embed |
Read files embedded in compiled binaries (Go-style) | None |
ob:html |
SSR engine for .html templates and .luax (template, render_template, raw, island, asset, jsx, render, escape) |
None |
Built-in Globals¶
Every script also has access to the global ob table:
ob.version— current Orbita runtime version string.ob.args— 1-indexed array of extra CLI arguments passed to the script.ob.class(base?)— native OOP helper supporting.new(...), callable constructors,init, and single inheritance without manual metatable boilerplate.ob.jsx/ob_jsx— virtual node helper used by the.luaxtranspiler.