Skip to main content

Module presets

Module presets 

Source
Expand description

The canonical preset recipe table. Every preset asset the workspace ships is described here exactly once, as a Recipe constant; the builder presets (utz_build::Config), the gen-preset command, and the data crates’ recipe guards all consume this table instead of restating the numbers.

A recipe stores each knob in the representation the builder takes (f64 tolerance and grid size, enum knobs), except the density floor, which is stored in the header’s fixed-point form because the builder-side fraction derives from it exactly while the reverse rounding is unavailable in core. The Provenance type bridges the remaining gap to PayloadHeader: it owns the f64 → f32 casts the encoder applies when stamping the header, so a guard can compare Provenance::from(&header) against Provenance::from(recipe) with no literals of its own.

Structs§

Provenance
The subset of header fields a recipe determines, in the header’s representation (f32 tolerance and grid size, fixed-point floor). Converting both a Recipe and a PayloadHeader into this type gives a recipe guard an exact, literal-free equality check.
Recipe
One preset’s complete build recipe: the name and every encoder knob that determines the shipped asset’s provenance stamp.

Constants§

ACCURATE
The accurate recipe: dataset all (the full Comprehensive zone set; the other presets use now), RDP ε=10 m with pop-density floor 0.10, i32, a 0.5° grid, and brotli.
BALANCED
The balanced recipe: RDP ε=50 m with pop-density floor 0.020, i24, a 2/3° grid, and brotli.
COMPACT
The compact recipe: RDP ε=1 000 m with pop-density floor 0.001, i24, a 4/3° grid, and xz.
TINY
The tiny recipe: RDP ε=10 000 m with pop-density floor 0.001, i16, a 2° grid, and gzip.
TINY_STATIC
The tiny-static recipe, which is TINY stored uncompressed so the asset is readable in place with zero decode RAM.

Statics§

ALL
Every preset recipe, in size order. Tools that need the preset name list (CLI validation, generate-all loops) iterate this instead of keeping their own copy.

Functions§

by_name
Looks a recipe up by its preset name; the result is None for a name the table does not carry.