Hatch is a cozy ecosystem of libraries and frameworks for the
Wren scripting language — tested, versioned, and
ready to drop into any project running on the Wrenlift runtime.
A single static binary, no extra runtime to install. Add packages with one command and you're up.
One line installs the hatch binary and the wrenlift runtime.
Scaffolds a hatchfile manifest and an entry script.
Wrenlift compiles and runs your script with hatched packages linked.
# 1. install $ curl -fsSL wrenlift.com/install.sh | sh # 2. scaffold $ hatch new my-app $ cd my-app $ hatch add @hatch:http @hatch:json # 3. run $ hatch run listening on :8080 ✓
Two first-party frameworks, both built on the same runtime. Same packages, same tooling, same hatchfile.
Server-rendered, htmx-native web framework for Wren. Ships a dev server with hot reload, file-based routing, and a production bundler that targets Wrenlift edge or Node.
Sprite batching, audio mixer, input mapping, ECS-lite scenes. 2D first, with hot reload for scripts, shaders, and assets — and a software renderer fallback so your prototype runs anywhere, browser included.
Curated, semver-pinned, spec-driven tested. Browse the full registry or search below.
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.
Wrenlift's tiered runtime is engineered for speed — cold scripts start quickly, hot paths get faster the longer they run.
Capability-based permissions for filesystem, network, and process access.
Ship your app and its packages as a single .hatch bundle — reproducible, signed, runnable on any wrenlift host.
Lockfiles, deterministic resolution, and reproducible builds out of the box.