Libraries

Every library in the loft registry. Each one is written in loft itself, so its source reads like your own code. Install one with loft install <name>, then use <name>; in your program.

45 packages in 17 categories

The same catalogue on the command line: loft api --registry. One library's public surface: loft api <name>.

Animation

LibraryVersionWhat it gives you
tween0.1.2Property tweens in exact integer time — eleven easing curves, chains and groups

Asset formats

LibraryVersionWhat it gives you
assets0.5.0A game's content pack that IS a loft store — art, audio and the scenes that place them, range-read off a static file server. No codec, no parse step, no server-side code.
drawing0.4.3Render a .draw scene — a sprite authored as lines of text — pixel-identically to the Python renderer it replaces
glb0.1.7glTF 2.0 binary (.glb) writer — exports Mesh / Scene as a glb file readable by Blender, three.js, gltf-validator. Standalone (pure-loft, no GPU).

audio

LibraryVersionWhat it gives you
audio_bus0.1.3A mixer for game audio — buses that multiply, and a duck that restores exactly

Command line

LibraryVersionWhat it gives you
arguments0.2.8CLI argument parsing — positional args + flags + auto-generated --help.
script0.4.0What a script reaches for, on demand: a recursive walk (lazy, or sorted), a copy, a glob, a set of texts — each a method that loads the library on use.

Cryptography

LibraryVersionWhat it gives you
crypto0.3.14Cryptographic primitives — SHA-256, HMAC, base64; Ed25519, X25519, HPKE (RFC 9180), ChaCha20-Poly1305 / XChaCha20-Poly1305 / AES-256-GCM, HKDF, OS CSPRNG.

Encoding

LibraryVersionWhat it gives you
cbor0.1.13Signable canonical CBOR (RFC 8949), pure loft — canonical map-key ordering, full decode, byte-identical encode->decode->encode, native == wasm.

Games

LibraryVersionWhat it gives you
assets0.5.0A game's content pack that IS a loft store — art, audio and the scenes that place them, range-read off a static file server. No codec, no parse step, no server-side code.
audio_bus0.1.3A mixer for game audio — buses that multiply, and a duck that restores exactly
fixstep0.1.4A fixed simulation step in exact integer time — clock, bank, one-shot timer
game_protocol0.1.7The message types a multiplayer game's client and server share — envelopes, kinds and constructors; pure loft, transport-agnostic
input0.2.6Game input for loft — action/axis bindings resolved to per-tick input state.
stage0.18.10A retained 2-D scene for loft: a node tree you mutate, with transforms, clipping, batching, pointer routing and widget states
time0.4.1Date/time arithmetic on millisecond-since-epoch integers — proleptic Gregorian, same model as JavaScript Date. Pure-loft; identical results on interp, --native, WASM.
tween0.1.2Property tweens in exact integer time — eleven easing curves, chains and groups

Geometry

LibraryVersionWhat it gives you
hex_body0.3.6The moving body — rigs, revolute joints with computed limits, pure poses, and collision proxies. hexbody's own body model, part of the hex_* family.
hex_draw0.1.4Draw a model into the field, and read its wall surface back.
hex_edge0.2.6Collision as an edge set, and the analytic surfaces behind it.
hex_field0.1.7Exact-integer hex cell sets and their outlines — the base of the hex_* family.
hex_fit0.1.5The doorstep — refuse at authoring time what would not round-trip.
hex_form0.1.7The exact turtle form on the hex lattice, and its canonical text.
hex_grid0.1.4Hex-grid geometry — pointy-top, ODD-R OFFSET coordinates: coordinate/pixel conversion, neighbours, distance, corners and canonical edges, plus a square local basis for right-angled structures placed on the hex world.
hex_place0.1.3Place, seat and combine — the operations a model survives.
hex_recover0.1.6Rebuild a model from the field — exactly, or with a reported residual.
hex_roof0.1.9Roof profiles as a height field, and the fit that recovers them.
hex_shape0.1.8The line primitive, the box and the arc — the shape vocabulary of the hex_* family.
hex_way0.1.6A way is an exact centreline plus offsets, never a rasterised band.
mesh3d0.1.53D geometry primitives — Vec/Mat, Mesh, Scene, Camera, Light. Standalone (pure-loft, no GPU).
shapes0.5.42D geometry primitives — Rect, Circle, overlap tests, clamp. Pure-loft, no other deps.

Graphics and 3D

LibraryVersionWhat it gives you
drawing0.4.3Render a .draw scene — a sprite authored as lines of text — pixel-identically to the Python renderer it replaces
glb0.1.7glTF 2.0 binary (.glb) writer — exports Mesh / Scene as a glb file readable by Blender, three.js, gltf-validator. Standalone (pure-loft, no GPU).
graphics0.9.122D canvas + 3D rendering for loft (Canvas pixel surface, Mesh / Scene / glTF, OpenGL bindings).
gridmesh0.2.6Chunk-local mesh-generation primitives for world-building algorithms.
imaging0.4.4PNG load/save + pixel manipulation for loft (Stage A — interpreter + native; wasm bridge deferred pending loft-host-ffi crate).
lavition_ui—Panel layout, hit-testing and text metrics for an in-engine editor UI: rectangles and hits, with no world, no lattice, no window and no GL.
mesh3d0.1.53D geometry primitives — Vec/Mat, Mesh, Scene, Camera, Light. Standalone (pure-loft, no GPU).
stage0.18.10A retained 2-D scene for loft: a node tree you mutate, with transforms, clipping, batching, pointer routing and widget states
text2d0.4.6Text that always draws — a built-in face, a glyph atlas, measured metrics, wrapping and alignment, with no font file and no GL context

Mathematics

LibraryVersionWhat it gives you
random0.3.6Pseudo-random number generation — PCG-64 thread-local PRNG with rand_seed reproducibility.

Networking

LibraryVersionWhat it gives you
game_protocol0.1.7The message types a multiplayer game's client and server share — envelopes, kinds and constructors; pure loft, transport-agnostic
server0.7.5HTTP + WebSocket server for loft — TCP sockets + tungstenite via cdylib.
ssh0.1.4SSH client for loft — drive an interactive remote shell (e.g. attach tmux) over password auth, never stored. Native-only.
web0.4.5HTTP client + WebSocket client for loft — ureq + tungstenite via cdylib.

Plugins

LibraryVersionWhat it gives you
pluginabi0.1.8Plugin call protocol — the six-operation contract (initial_state / apply_op / make_op / render / snapshot / load_snapshot) as canonical-CBOR frames over a byte channel. Not a runtime, ABI or sandbox: loft already provides those.

Randomness

LibraryVersionWhat it gives you
random0.3.6Pseudo-random number generation — PCG-64 thread-local PRNG with rand_seed reproducibility.

Text

LibraryVersionWhat it gives you
html0.1.3HTML escaping helpers for loft.
markdown0.2.5Markdown-to-HTML rendering for loft — headings, inline spans, slugify, link rewriting.
regex0.5.0Small-script regex: `search`, `matches`, `capture` / `capture_all` with groups, `replace_on` and a lazy `split_on`, with a thread-local pattern cache.
text2d0.4.6Text that always draws — a built-in face, a glyph atlas, measured metrics, wrapping and alignment, with no font file and no GL context
zttext0.1.6A text engine for loft: piece-table content core, transactional undo, and portable layout with measurement injected

Time

LibraryVersionWhat it gives you
fixstep0.1.4A fixed simulation step in exact integer time — clock, bank, one-shot timer
time0.4.1Date/time arithmetic on millisecond-since-epoch integers — proleptic Gregorian, same model as JavaScript Date. Pure-loft; identical results on interp, --native, WASM.

toolchain

LibraryVersionWhat it gives you
loft2026.10.0The loft toolchain: compiler, interpreter and standard library.

World building

LibraryVersionWhat it gives you
gridmesh0.2.6Chunk-local mesh-generation primitives for world-building algorithms.
hex_terrain0.1.8The OVERLAND terrain layer of the `hex_*` family: a coarse overland hex lattice
hex_world0.2.3Sparse 32x32-chunk hex-grid world data model — Cell / Chunk / World with binary save/load.