#error-handling #diagnostics-reporting #miette #reporting

nightly oak-diagnostic

Beautiful diagnostic reporting for the Oak ecosystem, inspired by miette

11 releases

Uses new Rust 2024

new 0.0.11 Mar 30, 2026
0.0.10 Mar 24, 2026
0.0.4 Feb 18, 2026
0.0.1 Jan 23, 2026

#245 in Internationalization (i18n)


Used in 2 crates

MPL-2.0 license

350KB
5.5K SLoC

🚀 oak-diagnostic

Crates.io Documentation

Diagnostic Reporting for Oak Languages — Structured error and warning reporting for language analysis tools.

🎯 Why oak-diagnostic?

Diagnostics are the feedback mechanism that helps developers fix issues in their code. oak-diagnostic provides a unified infrastructure for reporting errors, warnings, and hints with precise source locations.

✨ Key Features

  • 📊 Structured Diagnostics — Rich types with severity, message, and location
  • 📍 Precise Locations — Byte-offset based ranges for accurate highlighting
  • 🔧 Related Information — Support for related locations and additional context
  • 🎯 Severity Levels — Error, warning, information, and hint
  • 🔄 Serde Support — Optional serialization for LSP integration

🏗️ Architecture

  • Diagnostic — Range, severity, message, and related information
  • DiagnosticSeverity — Error, Warning, Information, Hint

🔗 Ecosystem Integration

Used by oak-lsp for textDocument/publishDiagnostics, language parsers for syntax error reporting, and static analysis tools for linting.

📖 Documentation

For usage examples and API details, see the API documentation.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Dependencies

~7–11MB
~112K SLoC