Expand description
benday-core: terminal charts from a Vega-Lite-style JSON spec.
Pure spec-in, string-out — no I/O, no TTY detection, no environment sniffing — so it can sit under a CLI, an MCP server, or another Rust program unchanged.
Re-exports§
pub use error::Error;
Modules§
- compile
- The compiler: resolve a spec against its data into a
Scene— every data- and layout-dependent decision made, geometry normalized to the plot rect. All colors are resolved here; the rasterizer never sees aTheme. - error
- ingest
- Data ingestion: resolve the spec’s inline data and/or a piped data
document into a normalized
Table. Pure — the CLI does the I/O. - scene
- The Scene: benday’s intermediate representation.
compile()resolves a spec against its data into a Scene — every data- and layout-dependent decision made, geometry normalized to the plot rect — andrasterize()turns a Scene into glyphs. The serialized form is the golden-corpus snapshot and the--dump-sceneoutput; it is explicitly unstable. - spec
- The chart specification: a strict subset of Vega-Lite’s JSON grammar.
- theme
- Color themes, named after print processes. Gradients and palettes are generated in OKLCH so ramps are perceptually uniform (no brightness wobble mid-gradient like naive HSV interpolation).
Structs§
Enums§
- BarStyle
- How bar marks are filled. Dots (the house style) rasterize bars through the pixel canvas at 4 vertical levels per cell; blocks give a solid silhouette with finer 8-levels-per-cell caps.
- Marker