Skip to main content

utz_data_tiny_static/
lib.rs

1//! The μTZ `tiny-static` preset asset. It ships the same decoded payload
2//! as `tiny` (dataset `now`, RDP ε=10 000 m with pop-density weight floor
3//! 1e-3, i16, 2° grid) uncompressed: it costs ~125 KB of flash, loads
4//! zero-copy via `Finder::from_static()` with ~0 RAM and no decoder, and
5//! works on the bare `core` rung.
6//!
7//! Regenerate (writes `data/tiny-static.utz`, gitignored) from the canonical
8//! recipe in `utz_common::presets`; the build script refuses assets that
9//! do not match it:
10//!
11//! ```text
12//! cargo run --release -p utz_build_cli -- gen-preset tiny-static
13//! ```
14
15#![no_std]
16
17/// The tiny-static asset bytes (outer header + uncompressed payload).
18/// The bytes are 4-aligned: this preset is borrowed in place by
19/// `Finder::from_static()`, and alignment keeps it valid under any geometry
20/// recipe (`FullRings` slice-casts `(i32, i32)` pairs; today's varint
21/// encoding doesn't care).
22pub static TINY_STATIC: &[u8] =
23    include_bytes_aligned::include_bytes_aligned!(4, "../data/tiny-static.utz");