Standard Library

The VERA standard library provides portable building blocks under the vera: namespace. Import any module with:

import "vera:io"

Modules

ModuleDescriptionPrimitives
vera:assertTesting assertions and result trackingNone (pure VERA)
vera:binaryBinary encoding/decoding (big/little-endian)None (pure VERA)
vera:envEnvironment variables and .env filesYes
vera:formatString formatting and buffer buildingNone (pure VERA)
vera:ioConsole I/O and file operationsYes
vera:mathMathematical functions (f64)None (pure VERA)
vera:memoryHeap allocation and memory operationsYes
vera:netTCP/UDP socket operationsYes
vera:net/dnsDNS hostname resolutionNone (uses vera:net)
vera:stringString and byte sequence operationsNone (pure VERA)
vera:threadThreading and synchronizationYes

Design Principles

  • Minimal primitives: Only ~35 compiler-provided functions (__vera_sys_*) bridge to the OS. Everything else is pure VERA.
  • Pure VERA modules: vera:string, vera:math, and vera:binary use zero primitives — they are implemented entirely in VERA using the ISA's arithmetic, memory, and comparison instructions.
  • Flat (ptr, len) convention: Strings are byte buffers with explicit lengths. No dedicated string type, no null terminators (except when interfacing with C-style APIs).