All packages
Every package currently in the registry — search, filter, click through for the README and API reference.
Window + input for any WrenLift app. winit on native, page-attached canvas on web — same `Window.create({...})` API, same `pollEvents` / `closeRequested` / `size` surface across targets. Bring-your-own canvas via `Window.attach(elementId)` on web.
Embedded SQLite. `Database.open(path)` returns a connection; prepared statements with named parameter binding, rows iterated as Maps, transactions, error handling. Backed by rusqlite (bundled libsqlite — no system dependency).
Image encode + decode. PNG / JPG / BMP / WebP in, RGBA8 buffer out — `Image.decode(bytes)` feeds straight into `@hatch:gpu`'s `Device.uploadImage(image)`, and `Image.encodePng(...)` writes synthesized buffers back out. Backed by the `image` crate.
GPU primitives + 2D/3D renderers. Device, Buffer, Texture, Sampler, ShaderModule, BindGroup, RenderPipeline, ComputePipeline, CommandEncoder, RenderPass, ComputePass on the bottom; Camera2D/3D, Frustum, Lod, Renderer2D (sprite batcher + drawInstancedSprites for storage-buffer-driven sprite batches), Renderer3D (Cook-Torrance / GGX PBR with multi-light + textured metallic-roughness workflow, plus drawMeshInstanced for storage-buffer-driven instanced meshes), Shader factory, Mesh, Material on top. Storage buffers + compute dispatch + fast typed-array readback for general-purpose GPU work. Camera3D.frustumPlanes + Frustum.sphereVisible for CPU-side frustum culling; Lod.select3 for distance-based level-of-detail bucketing — together they keep per-instance CPU cost flat in total scene size for the procedural-world performance target. Same shared source drives wgpu on native and WebGPU on web.
Rapier-backed physics. `World2D` and `World3D` from one import — bodies, colliders, gravity, force / impulse, position + velocity reads, raycasts, and contact-event streams. Bundles rapier2d + rapier3d in a single cdylib so games never have to choose between dimensions at the package level. Wires into `@hatch:game` for a step-per-frame physics loop.
Procedural noise primitives — 2D + 3D Simplex / Perlin / Value scalars, fractal Brownian motion octave-sum, and a batched Float32Array heightmap sampler. Backed by the `noise` crate so terrain generators, foliage scatter, weather simulations, and texture authoring all share the same deterministic, seeded implementations.
General-purpose audio playback for WrenLift apps. cpal-backed output stream + a tiny mixer; WAV decoding via hound. `Audio.context()` opens the device, `Sound.load(bytes)` decodes a clip, `audio.play(sound)` schedules immediate playback against the global mixer.
Common post-processing effects for the WrenLift game framework. `Tonemap`, `Vignette`, `Bloom`, `FXAA`, `ColorGrade`, `ChromaticAberration` — each a `PostPass` subclass that drops into `g.postFX = PostFX.new(g)` from `@hatch:game`. Effects ship here so the engine stays lean; new effects can be added without bumping `@hatch:game`.
Immediate-mode HUD overlay for the WrenLift game framework. `HUD.new(g)` gives you `hud.label`, `hud.rect`, `hud.button` — drawn through `@hatch:gpu`'s Renderer2D, with click + hover state tracked across frames. Ships a built-in 5×7 procedural font (digits + uppercase + common punctuation) so HUD essentials (`SCORE: 100`, `LIVES: 3`, `PAUSE`) work without bringing an asset font. Adds HUDPanel — an immediate-mode debug control panel that stacks slider / toggle / button / text / divider rows top-down inside a fixed-width box so procedural-world demos can expose every knob (wind strength, water amplitude, sun angle, terrain seed) at runtime without rebuilding the bundle.
Pure-Wren glTF 2.0 / .glb loader. Parses the binary container into nodes / meshes / materials, resolves accessors into typed vertex + index arrays (Float32Array / Int32Array / ByteArray), decodes embedded images via @hatch:image, and spawns a Transform-rooted hierarchy into a `@hatch:ecs` World with fully-textured PBR `Material`s wired to every glTF slot (baseColor / metallicRoughness / normal / occlusion / emissive).
Game framework for Wren. `Game.run(MyGame)` and you're rendering — subclass `Game`, override `setup` / `update` / `draw`, get a window + GPU device + per-frame loop wired in. Composes with `@hatch:ecs` / `@hatch:assets` / `@hatch:audio` / `@hatch:physics` for the rest of a game. Same source drives a winit window on native and a page-attached canvas on web. Scene-level constructs: Transform / GlobalTransform, MeshRenderer, ParticleSystem, lights, physics bridges, SceneRenderer3D, Terrain, Foliage, Wind, Water mesh + wave-height sampler, and WaterPipeline — a self-contained render pipeline that displaces the water mesh on the GPU with the same wave field the CPU sampler uses, fresnel-blends to a sky colour, and adds Blinn-Phong specular on the wave crests.
Spatial acceleration structures for 2D and 3D worlds. ClusterGrid for uniform-density buckets, Octree for adaptive 3D partitioning, Quadtree2D for sprite / UI hit-testing, and BVH over AABBs for ray casts and frustum culling. Pure Wren; composes with @hatch:gpu's Camera3D + Frustum for cull and LOD pipelines and with @hatch:noise for procedural density sampling.
Entity-component-system for Wren. `World` storage + fluent `Query.with(C).without(C)` filters, component-instance bundles for one-call spawns, typed `Resources` and `Events<T>`, deferred `Commands` for safe mid-loop mutation, hierarchy via `setParent` / `childrenOf`, `onAdd` / `onRemove` lifecycle hooks, and a `Schedule` with `before` / `after` ordering for system dispatch. `SaveSystem.snapshot(world, components)` + `SaveSystem.restore(...)` round-trip ECS state through plain Maps ready for JSON. Pure Wren — composes with `@hatch:game`'s frame loop, runs anywhere Wren runs.
Server-rendered, htmx-native web framework for Wren. Router, middleware, content-negotiated rendering via @hatch:template, HTTP/1.1 server on top of @hatch:socket.
Content-addressable assets database with hot-reload. Two backends behind one API — filesystem-backed on native (Fs.walk + content hashes + Hatch.watchFile), manifest-driven on web (fetch + lazy reads, page ships an `assets-manifest.json`). Edit a shader / texture / config file, see registered subscribers fire.
JSON parser and serializer. Pure Wren, no native deps.
Harel statecharts for Wren. Hierarchical and parallel states, history, guards, entry/exit/transition actions, context, signal-based observation. Pure Wren.
Spec coverage for the built-in ByteArray / Float32Array / Float64Array types.
Colour primitive — RGBA scalars with rgb / hsv / hex constructors, named constants, lerp, and Vec4 interop.
Vector + matrix + quaternion math — Vec2 / Vec3 / Vec4 / Mat4 / Quat, easings, NumRange, and scalar helpers. Built for interactive apps and games.
Tiny test runner for *.spec.wren files.
Subprocess spawn with lifecycle, streaming IO (blocking + fiber-cooperative), and pipelines.
Level-filtered structured logger with ANSI colors.
HTTP/1.1 client with TLS, streaming bodies, and fiber-cooperative reads.
Timezone-aware DateTime value type, Duration arithmetic, RFC 3339 parse + format.
Read and write ZIP archives entirely in memory (store / deflate / zstd).
Jinja/Twig-style templating for HTML and XML with first-class htmx support — fragments, components, slots, conditionals, loops, response helpers.
URL parser, builder, and percent-encoder.
UUID v4/v5/v7 generation, parsing, and byte conversion.
Clocks, sleep, and UTC timestamp formatting.
TOML parser and serializer, backed by the Rust `toml` crate.
Random numbers, sampling, shuffle — one-shot statics + seedable streams.
TCP listeners + connections and UDP datagram sockets. Blocking and non-blocking variants suitable for fiber-cooperative schedulers.
Compiled regular expressions with capture groups, replace, and split.
Filesystem path manipulation: join, split, parent, ext, normalize.
Process-level primitives: platform, env vars, argv, exit, tty.
Byte buffers plus Reader / Writer streams with fiber-cooperative `withTryFn`.
Hashes (MD5/SHA-1/SHA-256/SHA-512), HMAC, base64.
Fluent + functional collection operations — map / filter / reduce / flatMap / groupBy / partition / zip / sortBy / scan / chunked / windowed / distinct and the usual suspects.
Filesystem I/O — read, write, stat, list, walk.
ANSI color + padding + small numeric helpers for terminal output.
Signals, EventEmitter, and a cooperative Scheduler for fiber concurrency.
RFC 4180 CSV parser + serializer. Handles quoting, embedded newlines, header rows.
Clap-style argument parser for Wren command-line tools.
AES-256-GCM authenticated encryption + Ed25519 sign/verify + CSPRNG.
Fluent assertion primitives for Wren test specs.