[Ariadne has moved to Codeberg!] A fancy diagnostics & error reporting crate
[Ariadne has moved to Codeberg!] A fancy diagnostics & error reporting crate
A fancy compiler diagnostics crate.
…See examples/ for more examples.
For each error you wish to report:
Report::build() to create a ReportBuilder.finish method to get a Report.Report, call print or eprint to write the report
directly to stdout or stderr. Alternately, you can use
write to send the report to any other Write destination (such as a file).ariadne is a sister project of chumsky. Neither are dependent on
one-another, but I'm working on both simultaneously and like to think that their features complement each other. If
you're thinking of using ariadne to process your compiler's output, why not try using chumsky to process its input?
yansi)ColorGenerator type that generates distinct colours for visual elements."concolor" enables integration with the concolor crate for global color output
control across your application"auto-color" enables concolor's "auto" feature for automatic color controlconcolor's features should be defined by the top-level binary crate, but without any features enabled concolor does
nothing. If ariadne is your only dependency using concolor then "auto-color" provides a convenience to enable
concolor's automatic color support detection, i.e. this:
[dependencies]
ariadne = { version = "...", features = ["auto-color"] }is equivalent to this:
[dependencies]
ariadne = { version = "...", features = ["concolor"] }
concolor = { version = "...", features = ["auto"] }The API (should) follow semver. However, this does not apply to the layout of final error messages. Minor tweaks to the internal layout heuristics can often result in the exact format of error messages changing with labels moving slightly. If you experience a change in layout that you believe to be a regression (either the change is incorrect, or makes your diagnostics harder to read) then please open an issue.
Ariadne currently has a Minimum Supported Rust Version (MSRV) of 1.85.0.
Thanks to:
@brendanzab for their beautiful codespan crate that inspired me to try
pushing the envelope of error diagnostics.
@estebank for showing innumerable people just how good compiler diagnostics can be through their work on Rust.
This software is proudly and fondly written, maintained, used - and most crucially - understood by real human beings. While we can't personally attest to the provenance of every line of code ever contributed, the vast majority of the codebase has certainly been developed without the aid of large language models and other stochastic 'intelligence'.
While the license may not guarantee warranty 'of any kind', you can at least use this software in the comforting knowledge that its veracity and coherence is vouched for by sentient intelligence with skin in the game and a reputation to uphold.
See CONTRIBUTING.md.
No open issues yet, or sync has not completed.