Skip to content

v0.2.0

Choose a tag to compare

@cscheid cscheid released this 29 Jun 16:09
· 6 commits to main since this release

Pluggable, feature-gated source-context renderer

Adds annotate-snippets (the rust-lang toolchain's diagnostic style) as an alternative to ariadne, selectable at runtime — no breaking change to the public API.

  • Cargo features: ariadne (default-on, unchanged) and annotate-snippets (opt-in). Both deps are optional.
  • SourceRenderer enum + DiagnosticMessage::to_text_with_renderer(ctx, &opts, Option<SourceRenderer>). to_text / to_text_with_options delegate with None, so existing callers are untouched.
  • Annotate-snippets path renders the native error[CODE]: / --> / ^^^ look.

By-design deltas in the annotate-snippets path: no OSC 8 hyperlinks; detail labels render as Context (no per-DetailKind color / Fixed(249) faded blend); empty padding-details skipped (native folding). The JSON wire shape (rendered) is unchanged — it still uses the default renderer.

Also adds cargo xtask verify (local CI mirror) and excludes internal tooling/docs from the published crate.

Full PR: #1