Skip to content

Repository files navigation

cachet

Cachet is a small no_std atlas for glyphs, sprites, icons, and other repeated image patches. It separates placement and reuse from the storage holding the pixels.

Fence

The placement core owns rectangle packing, keyed validity, publication, lease-safe reuse, and atlas diagnostics. A concrete CPU facade adds page bytes and dirty uploads. Cachet does not own rasterization, font or animation semantics, GPU objects, command submission, completion fences, or general resource lifetime.

One cache instance represents one complete compatibility domain. An R8 coverage atlas and an RGBA8 color atlas therefore use separate caches, as do CPU-mirrored and directly GPU-rendered pages or sprites whose sampling, padding, color-space, or retention requirements differ from color glyphs.

The clean-root implementation is tracked under Beads epic cac-2qv. Its accepted boundary is recorded in crates/cachet/docs/adr-0001-raster-artifact-atlas.md.

Runnable examples

cargo run -p glyph-atlas-demo
cargo run -p gpu-atlas-demo
cargo run -p sprite-atlas-demo
  • glyph-atlas-demo composes separate CPU-backed R8 coverage and RGBA8 color caches and walks their dirty-upload lifecycle.
  • gpu-atlas-demo simulates the boundary Tavolo would own: page textures, command ordering, submission serials, and fence-driven lease release.
  • sprite-atlas-demo uses sprite-native keys and pivot metadata with a CPU-backed RGBA8 cache.

Performance wind tunnel

cachet_wind_tunnel keeps Criterion and optional allocation instrumentation outside the core crate:

cargo bench -p cachet_wind_tunnel --bench atlas
cargo run --release -p cachet_wind_tunnel --features allocation-counting

The allocation run contains executable steady-state budgets. Current reference results live in benchmarks/cachet_wind_tunnel/RESULTS.md.

Issue tracking

Issue history lives in a Dolt database synchronized through this repository's remote. It is independent from ordinary Git source history.

# Fresh clone
chmod 700 .beads
git config beads.role contributor # use maintainer when appropriate
bd bootstrap
bd hooks install --beads

# Work session
bd prime
bd dolt pull
bd ready

# Publish issue changes explicitly
bd dolt push

Automatic Dolt pushes are disabled intentionally.

About

Experimental Rust crates for bounded residency, atlas allocation, and tiled-surface caching in renderer-adjacent systems.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages