bynk-render 0.99.0

Bynk's shared diagnostic-rendering layer: ariadne human output and the short/json forms over bynk-syntax::CompileError. The presentation layer both CLI front-ends adopt so they render identically.
Documentation

bynk-render

crates.io docs.rs License: MIT OR Apache-2.0

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 ariadne output (with a colourless variant for byte-stable transcripts), and
  • short — one terse path:line:col: severity[category]: message line per error, the format the editor problem-matcher parses.

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.

Use

[dependencies]
bynk-render = "0.66"
// `errors: &[bynk_syntax::CompileError]`, with the source and a label.
bynk_render::print_errors(errors, source, filename);          // ariadne, to stderr
let short = bynk_render::render_errors_short(errors, source, filename);

Most users see this crate's output through the bynkc / bynk CLIs rather than depending on it directly. See the API docs.

License

Licensed under either of Apache-2.0 or MIT at your option.