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.

59 packages in 18 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.3Property tweens in exact integer time — eleven easing curves, chains and groups

Asset formats

LibraryVersionWhat it gives you
assets0.5.3A 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.5.4Render a .draw scene — a sprite authored as lines of text — pixel-identically to the Python renderer it replaces
glb0.1.10glTF 2.0 binary (.glb) reader and writer — exports Mesh / Scene as a glb file readable by Blender, three.js, gltf-validator, and reads a glb back into them. Standalone (pure-loft, no GPU).

audio

LibraryVersionWhat it gives you
audio0.2.8Clips, voices and one mix: the same sound on a PC and on a 32-bit device
audio_bus0.2.1A mixer for game audio — buses that multiply, and a duck that restores exactly

Command line

LibraryVersionWhat it gives you
arguments0.2.9CLI 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.5.3SHA-256, HMAC, HKDF, Argon2id password hashing, AES-256-GCM, Ed25519, ECDSA P-256, X25519, HPKE, base64 and hex: one C source on every target, native == wasm

development-tools

LibraryVersionWhat it gives you
gpu_record0.3.1A GPU backend that draws nothing and writes down every call it receives: for testing a program's drawing on a machine with no display

Encoding

LibraryVersionWhat it gives you
cbor0.1.15Signable 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.3A 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.
audio0.2.8Clips, voices and one mix: the same sound on a PC and on a 32-bit device
audio_bus0.2.1A 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.9The message types a multiplayer game's client and server share — envelopes, kinds and constructors; pure loft, transport-agnostic
gpu0.4.3Drawing on a GPU through pipelines, passes and uniform blocks, with no graphics stack named: a backend library beneath it draws
gpu_gl0.3.6The OpenGL backend of gpu: OpenGL 3.3 on Linux and macOS, OpenGL ES 3 on Android, WebGL2 in a page
gpu_host0.1.1Opens a gpu device on the backend this machine has: Metal on a Mac, OpenGL elsewhere and where Metal is absent, Vulkan on Linux by name
gpu_metal0.2.3The Metal backend of gpu: a Mac's GPU through Metal, in a window of its own
gpu_paint0.2.1Rectangles, images and sprites at pixel positions, drawn through gpu: a painter and sprite sheets for any backend
gpu_vulkan0.2.4The Vulkan backend of gpu: Vulkan 1.3 on Linux, in an X11 window
input0.3.3Game input for loft — action/axis bindings resolved to per-tick input state.
scene3d0.7.0A 3D scene a game's view gives once — tiles of faces, the cells' light, actors — drawn through gpu
screen0.2.2A small frame on the machine's screen, scaled up, with the keys of its window — one API on a desktop and a device
stage0.21.3A retained 2-D scene for loft: a node tree you mutate, with transforms, clipping, batching, pointer routing and widget states
tile_world0.14.3An unbounded, layered square-grid world, and the routines that answer questions about it: paths, sight and light
tiles0.7.2Tile sheets, map layers and sprites drawn at a surface's own resolution through a camera
time0.4.3Date/time arithmetic on millisecond-since-epoch integers — proleptic Gregorian, same model as JavaScript Date. Pure-loft; identical results on interp, --native, WASM.
tween0.1.3Property tweens in exact integer time — eleven easing curves, chains and groups

Geometry

LibraryVersionWhat it gives you
hex_body0.3.8The 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.12Draw a model into the field, and read its wall surface back.
hex_edge0.2.12Collision as an edge set, and the analytic surfaces behind it.
hex_field0.1.13Exact-integer hex cell sets and their outlines — the base of the hex_* family.
hex_fit0.1.7The doorstep — refuse at authoring time what would not round-trip.
hex_form0.1.10The exact turtle form on the hex lattice, and its canonical text.
hex_grid0.1.5Hex-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_ground0.1.6The ground of one place: a height and a surface kind per cell, shaped into terraces, a hill, a seat, a cut and cliffs
hex_place0.1.8Place, seat and combine — the operations a model survives.
hex_recover0.1.8Rebuild a model from the field — exactly, or with a reported residual.
hex_roof0.1.12Roof profiles as a height field, and the fit that recovers them.
hex_shape0.1.12The line primitive, the box and the arc — the shape vocabulary of the hex_* family.
hex_walk0.1.2A body walking through a built world: walls, steps, doorways it eases into, door leaves it pushes and pulls, ladders, and a head that turns before the body.
hex_way0.1.8A way is an exact centreline plus offsets, never a rasterised band.
mesh3d0.1.63D geometry primitives — Vec/Mat, Mesh, Scene, Camera, Light. Standalone (pure-loft, no GPU).
shapes0.5.62D geometry primitives — Rect, Circle, overlap tests, clamp. Pure-loft, no other deps.

Graphics and 3D

LibraryVersionWhat it gives you
drawing0.5.4Render a .draw scene — a sprite authored as lines of text — pixel-identically to the Python renderer it replaces
glb0.1.10glTF 2.0 binary (.glb) reader and writer — exports Mesh / Scene as a glb file readable by Blender, three.js, gltf-validator, and reads a glb back into them. Standalone (pure-loft, no GPU).
gpu0.4.3Drawing on a GPU through pipelines, passes and uniform blocks, with no graphics stack named: a backend library beneath it draws
gpu_gl0.3.6The OpenGL backend of gpu: OpenGL 3.3 on Linux and macOS, OpenGL ES 3 on Android, WebGL2 in a page
gpu_host0.1.1Opens a gpu device on the backend this machine has: Metal on a Mac, OpenGL elsewhere and where Metal is absent, Vulkan on Linux by name
gpu_metal0.2.3The Metal backend of gpu: a Mac's GPU through Metal, in a window of its own
gpu_paint0.2.1Rectangles, images and sprites at pixel positions, drawn through gpu: a painter and sprite sheets for any backend
gpu_record0.3.1A GPU backend that draws nothing and writes down every call it receives: for testing a program's drawing on a machine with no display
gpu_vulkan0.2.4The Vulkan backend of gpu: Vulkan 1.3 on Linux, in an X11 window
graphics0.14.6A 2D canvas, windows, drawing on the GPU and text for loft (meshes and glTF are mesh3d and glb)
gridmesh0.2.10Chunk-local mesh-generation primitives for world-building algorithms.
imaging0.5.7PNG load/save and pixel manipulation for loft: one C source on every target, no Rust 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.63D geometry primitives — Vec/Mat, Mesh, Scene, Camera, Light. Standalone (pure-loft, no GPU).
scene3d0.7.0A 3D scene a game's view gives once — tiles of faces, the cells' light, actors — drawn through gpu
screen0.2.2A small frame on the machine's screen, scaled up, with the keys of its window — one API on a desktop and a device
stage0.21.3A retained 2-D scene for loft: a node tree you mutate, with transforms, clipping, batching, pointer routing and widget states
text2d0.4.9Text that always draws — a built-in face, a glyph atlas, measured metrics, wrapping and alignment, with no font file and no GL context
tiles0.7.2Tile sheets, map layers and sprites drawn at a surface's own resolution through a camera

Mathematics

LibraryVersionWhat it gives you
random0.5.3PRNGs in three tiers: a shared PCG-64 with rand_seed reproducibility, owned RandStream streams, and a 32-bit tier

Networking

LibraryVersionWhat it gives you
game_protocol0.1.9The message types a multiplayer game's client and server share — envelopes, kinds and constructors; pure loft, transport-agnostic
server0.8.1HTTP + WebSocket server for loft — the natives are loft's `net` component, so the package builds no crate.
ssh0.1.6SSH client for loft — drive an interactive remote shell (e.g. attach tmux) over password auth, never stored. Native-only.
web0.5.0HTTP client + WebSocket client for loft — the natives are loft's `net` component, so the package builds no crate.

Plugins

LibraryVersionWhat it gives you
pluginabi0.1.11Plugin 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.5.3PRNGs in three tiers: a shared PCG-64 with rand_seed reproducibility, owned RandStream streams, and a 32-bit tier

Text

LibraryVersionWhat it gives you
html0.1.4HTML escaping helpers for loft.
markdown0.2.6Markdown-to-HTML rendering for loft — headings, inline spans, slugify, link rewriting.
regex0.6.4Small-script regex: `search`, `matches`, `capture` / `capture_all` with groups, `replace_on` and a lazy `split_on`, with a cache of compiled patterns.
text2d0.4.9Text 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.7A 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.3Date/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.12.0The loft toolchain: compiler, interpreter and standard library.

World building

LibraryVersionWhat it gives you
gridmesh0.2.10Chunk-local mesh-generation primitives for world-building algorithms.
hex_ground0.1.6The ground of one place: a height and a surface kind per cell, shaped into terraces, a hill, a seat, a cut and cliffs
hex_terrain0.1.9The OVERLAND terrain layer of the `hex_*` family: a coarse overland hex lattice
hex_world0.2.5Sparse 32x32-chunk hex-grid world data model — Cell / Chunk / World with binary save/load.
tile_world0.14.3An unbounded, layered square-grid world, and the routines that answer questions about it: paths, sight and light