Reference Browse docs
On this page 7 sections

Reference

Standard library

Import by path, share one global namespace, and know each wave by name. The catalog, the rules, and the quarantine convention for what is missing.

Importing

You import a module by its path. Two kinds of path:

  • Relative (./helpers.orb): resolved against the importing file, then the working directory.
  • Standard library (std/...): the canonical spelling, resolved against the std roots in order — the compiler binary’s directory, its parent, then the working directory. Run builds from the repository root so std/ resolves.
imports.orb
import "./helpers.orb"
import "std/string/string.orb"
import "std/test/assert.orb"

All std paths are lowercase (std/<area>/<module>.orb). The catalog grows module by module, each with an example, tests under tests/std/, and docs. Until it covers your need, keep module boundaries small and pin the compiler version in CI. The assertion helpers the suite itself uses live in std/test/assert.orb.

One namespace

The import namespace is global: a name may be declared only once across the whole import graph, and private does not restrict anything. Two modules declaring the same helper is a Duplicate symbol the moment both land in one graph:

clash.orb
// a.orb declares:  fn trim(...)
// b.orb declares:  fn trim(...)

import "./a.orb"
import "./b.orb"   // both in one graph: Duplicate symbol

That is why shared C externs have a single owner module and borrowers must not redeclare them:

Wave 1

Shipped and tested under tests/std/ (run with python scripts/corpus_gates.py suite --cc <compiler> --compiler <path> --dir tests/std):

Module Provides Not provided / notes
std/test/assert.orb assertTrue, assertEqInt, assertEqStr for exit-code tests, their *Msg forms (assertTrueMsg, assertEqIntMsg, assertEqStrMsg) and failFastHere No assertErr: a result passed as an argument works, and try/catch on a result parameter works inline, but the pair is not yet exercised (STAB-9)
std/string/string.orb trim, startsWith, endsWith, contains, indexOf, replace, join, split, padLeft, padRight, toUpper, toLower (byte-wise, ASCII-only), parseIntChecked and parseFloatChecked (canonical decimal only; return result, consume with inline try) orbit_string_to_int is bound by the .to_int() method on strings
std/hash/hash.orb sha256Hex, hmacSha256 (runtime bindings) No fnv1a32. There used to be a module claiming to provide it, and it is gone — its hash was 1469598103 + data.len(), so "hello" and "hellp" hashed equal. Real FNV-1a of "hello" is 1335831723

Wave 2

Module Provides Not provided / notes
std/collections/lists.orb Generic getOr, firstOr, lastOr, listContains, listIndexOf, reverse, plus the typed containsStr, containsInt, indexOfStr, indexOfInt over builtin lists Maps are out of scope (method lowering targets lists today); higher-order helpers need closures the language lacks. Every helper declares its payload (fn getOr[T](l: list<T>, …), fn containsStr(l: list<string>, …)): a caller naming the element type and passing a different one fails orbit check with E1005 naming both; a caller handing a bare list still runs, and the runtime aborts with a clear “list element type mismatch” on the first typed read instead of dereferencing the wrong shape
std/fs/file.orb Path-based readAll (returns result, consume with inline try), writeAll, append (read-modify-write, never atomic), exists, removeFile, listDir, isDir, removeDir (empty directories only), mkdirAll, walk (depth-first, capped at 32 levels) No open handles, no buffered streams, no file watching (poll walk with sleepMs)
std/io/io.orb supportsColor (NO_COLOR/TERM=dumb honored), gradient with a real hex parser (bad input returns the text unchanged), styling in std/sys/term/color.orb No readLine (needs an arena-taking binding the compiler will not inject), no eprint (no stderr builtin), no println (builtin print already newlines)
std/time/time.orb uptimeSeconds, addSeconds, elapsedSince, deadlineExceededSeconds, tickNs/sinceNs/sinceMs/sinceNsBetween (sub-second spans), wallSeconds (unix epoch seconds), sleepMs Ints are 64 bits. sinceNs and sinceMs answer -1 when the clock went backwards. Take a new reading instead of believing the number. A wall-clock difference is not a duration. uptimeSeconds() and the builtin system.uptime() are the same counter through the same extern — one clock, not two, so do not go reconciling them
std/sys/proc/process.orb pid, getEnv, getEnvOrDefault, execStatus (verify shell codes per platform by hand), exitProcess (named to never shadow libc exit), argCount, arg, args, capture arg(0) is the program path; an out-of-range index answers "". capture answers "" unless the program was built with -DORBIT_WITH_EXEC (shell execution is opt-in)
std/log/log.orb info, warn, error, debug(msg, enabled), withReq, toJsonLine No globals: context travels explicitly
std/json/json.orb jsonQuote: JSON-escape a runtime string for hand-built bodies; parseJson (returns result) with the readers jsonStr, jsonInt, jsonFloat, jsonBool, jsonObj, jsonArrLen and jsonArrStr/jsonArrInt/jsonArrFloat/jsonArrBool/jsonArrObj The parser is never partial: bad escapes, trailing data, overflow past int32, mixed or nested arrays and nesting past 64 levels are an err. A missing key reads as its type’s default (0, 0.0, ""); a present field read through the wrong getter aborts, so check the shape first. jsonQuote escapes backslash (first), quote, newline, CR and tab; remaining control bytes are out of scope by design. Object literals already escape on serialization; this is for the interpolation case, which does not

Wave 4

There is no Wave 3 — the numbering follows the landing order, and the gap is honest, not a typo.

Module Provides Not provided / notes
std/sys/crypto/jwt.orb signHs256, verifyHs256 (HS256 only, no alg:none; time travels explicitly as nowUnix; wallSeconds in std/time/time.orb is the epoch-seconds source), decodePayload (pure base64url decode), getExp, verifyWithKeys for rotation exp is required; nbf, when present, must not be future; iat is carried, not enforced
std/bytes/bytes.orb newBuffer, appendByte, appendSlice, writeFrame/readFrame (decimal length prefix; malformed and empty both read as empty), readAt (-1 out of range), sliceBuf, availableRead, consume, clear Bytes are 1–255 (C strings cannot hold NUL), so there is deliberately no fixed-width binary framing. Module-wide rule, not one function’s quirk: readAt returns the byte, and -1 out of range

Deferred honestly, and not present in the tree: raw sockets (no socket API in the language or the runtime) and a sync pool (needs closures). There is no fnv1a32 in std/hash.

Also in the tree

These nine modules are in the current tree and are imported the same way as the waves above. The Provides column names what each module’s source declares.

Module Provides Notes
std/convert/convert.orb intToString, charFromCode, floatFromString Owns the orbit_int_to_string, orbit_string_to_int, orbit_string_from_char_selfhost and orbit_string_to_float bindings. floatFromString is a bare atof ("abc" answers 0.0): use parseFloatChecked on untrusted text
std/convert/codec.orb base64Encode/base64Decode (RFC 4648, padded), hexEncode/hexDecode
std/string/regex.orb regexMatch, regexFind, regexValid A strict subset: backreferences, lookaround and lazy stars are rejected, not weakened
std/sys/bytes/bitwise.orb bitAnd, bitOr, bitXor, bitNot, shiftLeft, shiftRight The operators &, |, ^, ~, << and >> exist in the language; this module wraps them as functions. A shift count is masked to six bits, so shiftLeft(1, 32) is 4294967296 and shiftLeft(1, 64) is 1
std/sys/http/client.orb fetch Blocking HTTP/1.1 GET only. No TLS (an https URL is an err), no redirects, no auth, no proxy
std/sys/random/random.orb randomBytes(n) as ints 0..255 OS entropy. No PRNG and no seed state
std/sys/term/color.orb wrapBold, wrapDim, wrapUnderline, wrapRgbForeground, wrapRgbBackground TrueColor/ANSI styling. std/io/io.orb builds on it
std/option/option.orb union Option[T] { Some(T) None } One tag set per written type, so Option<int> and Option<string> are two instances. A None that no written type names is refused, not guessed. tests/std/test_option.orb pins the module
std/sys/arena.orb initArena, alloc, reset A counted logical region, not a real allocator. alloc returns an offset into the region, or -1 past capacity. Nothing it returns is dereferenceable. reset zeroes the offset

Quarantine

std/quarantine/ holds only README.md today. The convention stays: .orb means “loadable source”, so a file the parser cannot read must not carry that extension. It would break fmt --check on every run and could only ever be imported to produce a parse error.

Option returned on 2026-11-02 as std/option/option.orb, a generic tagged union (union Option[T] { Some(T) None }). tests/std/test_option.orb pins it. A second file used to sit here, bitwise.orb.quarantined. It was a syntax slip, not a missing feature, so it is std/sys/bytes/bitwise.orb again (see above).

The directory and its rules stay for the next module the language cannot express. The tree holds 21 modules. tests/std/test_imports.orb imports all 21 into one program and calls every one except std/sys/http/client.orb, which needs a network. Re-verify on every compiler bump, since counts and contracts are tree-revision-sensitive. Everything the language and its library cannot do yet is on limits.

Type to search commands, errors, modules and concepts.