5 releases

0.1.4 Nov 2, 2024
0.1.3 Jul 29, 2024
0.1.2 Jul 26, 2024
0.1.1 Jul 11, 2024
0.1.0 Jul 11, 2024

#692 in Development tools

Download history 141/week @ 2024-07-22 149/week @ 2024-07-29 9/week @ 2024-09-16 2/week @ 2024-09-23 5/week @ 2024-09-30 114/week @ 2024-10-28 19/week @ 2024-11-04

133 downloads per month

MIT license

310KB
264 lines

reporting Crates.io Version docs.rs

Simple diagnostic reporting for compilers.

use reporting::{error, note, File, Location, Renderer, Styles};

fn main() {
    let file = File::new("test.txt", "import stds;");
    let styles = Styles::styled();

    print!(
        "{}",
        Renderer::new(
            &styles,
            &[
                error!("Could not find package `{}`", "stds")
                    .location(Location::new(file.clone(), 7)),
                note!("Perhaps you meant `std`?")
            ]
        )
    )
}

lib.rs:

Simple diagnostic reporting for compilers.

use reporting::{error, note, File, Location, Renderer, Styles};

let file = File::new("test.txt", "import stds;");
let styles = Styles::styled();

print!(
    "{}",
    Renderer::new(
        &styles,
        &[
            error!("Could not find package `{}`", "stds")
                .location(Location::new(file.clone(), 7)),
            note!("Perhaps you meant `std`?")
        ]
    )
);

Dependencies

~1.5MB
~23K SLoC