ezu-style
Ezu Style Spec parser for the ezu workspace.
A pure serde-based reader for the node-DAG style language. Parsing
this crate produces a [Document] — a data structure, not an
evaluator. To execute a document, feed it to
ezu-graph::build_graph with a NodeRegistry.
Spec at a glance
References inside node fields use a prefix:
@name— node reference (input wiring)$name—paramssubstitution at build time
Each features node references a host-bound layer by name
(tile.<layer> for per-tile MVT/GeoJSON data) and carries an optional
filter (entries AND-combined; values are single literals or membership
lists) and an optional min-zoom-field.
The sources block is the single home for every external
resource the renderer pulls in — document-scoped files (brushes,
images) sit next to tile-scoped pyramids (MVT, PMTiles, DEM). Each
entry's type discriminates the variant; document-scoped variants
carry a src URI, tile-scoped variants a url template.
src URIs are explicit-scheme — pick one of:
builtin:NAME— bundled brush / image included inezu-paint's built-in bank, or a host-registered resource of the same name.file:PATH— local file resolved against--assets-dir(or absolute)..myb/.png/.webpextensions are inferred from the sourcetypeif omitted.http(s)://...— fetched by the host (CLI native,prefetch_doc_assets) before the first render, then cached in the in-memory bank.
Tile-scoped source kinds:
dem— raster-DEM tile pyramid (terrarium or mapbox-rgb encoding). The host stitches the 3×3 neighbourhood into a per-tileScalarField(withgeo_scalepopulated) and binds it undertile.<source-name>, ready for thedemsource node to pick up.mvt— XYZ MVT URL template (or a TileJSON document). The host fetches one tile per render, decodes every layer, and binds each one undertile.<layer-name>— the same names existingfeaturesnodes already reference.pmtiles— PMTiles archive (local path orhttp(s)://URL). Decoded layers bind the same way asmvt.
"sources":
For mvt / pmtiles, the source key (basemap above) is a label —
bindings still use the layer names from the decoded tile. Declare only
one MVT-flavoured source per style; later entries are ignored.
Types
pub type FeatureFilter = ;
Example
let doc = from_json?;
println!;
License
MIT or Apache-2.0, at your option.