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

#701 in Development tools

Download history 9/week @ 2024-09-14 2/week @ 2024-09-21 5/week @ 2024-09-28 129/week @ 2024-11-02 4/week @ 2024-11-09 3/week @ 2024-11-16 1/week @ 2024-11-23

137 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