bynk-render
The shared diagnostic-rendering layer for the Bynk compiler.
Given a slice of bynk_syntax::CompileError plus the source and a filename, it
produces the human and machine forms of a Bynk diagnostic:
- human — rich, source-pointing
ariadneoutput (with a colourless variant for byte-stable transcripts), short— one tersepath:line:col: severity[category]: messageline per error, the format the editor problem-matcher parses, andjson— the structured line form the same span/severity data feeds for machine consumers.
Every Bynk front-end renders through this one crate, so the CLI, the project
builder, and the editor all display the same error identically. The crate is a
pure presentation layer: it depends on
bynk-syntax only (plus ariadne)
and never sees the checker or emitter — structured diagnostics flow down into
it, never the other way.
Where it sits
bynk-syntax ◀── bynk-render · bynk-fmt · bynk-check ◀── bynk-emit ◀── bynk-ide
The bynkc, bynk, and bynk-lsp binaries are front-ends over this set. Most
users see this crate's output through the
bynkc / bynk
CLIs rather than depending on it directly.
Use
[]
= "0.120"
// `errors: &[bynk_syntax::CompileError]`, with the source and a label.
print_errors; // ariadne, to stderr
let short = render_errors_short;
See the API docs for the full surface.
License
Licensed under either of Apache-2.0 or MIT at your option.