5 stable releases

2.0.0 Jun 21, 2024
1.0.4 Jun 20, 2024

#307 in Command-line interface

Download history 143/week @ 2024-06-14 189/week @ 2024-06-21 2/week @ 2024-06-28

139 downloads per month

MIT license

30KB
662 lines

Frack

error generated by frack

A fake Rust error generator - both CLI and as a lib! Can be used for joke errors or, if you desire, real ones.

The goal is to be as accurate to real rustc errors/warnings as possible. If I'm missing the mark, please make an issue or a PR.

CLI

See frack help.

Command for the image:

frack
    error AMOGUS
        "this code is sus" \
        "    let Foo { x } = z;" \
        8-16 \
    fix "`y` lives matter" \
        "    let Foo { x, y } = z;" \
        15-17 \
    help "don't discriminate next time" \
    note "error generated by Kyllingene/frack"

Lib

See files in examples/: they're small and easy-to-read. To try them out, do cargo run --example NAME, e.g. cargo run --example demo.


lib.rs:

Utilities for creating rustc-like error messages, for fun or for actual use.

Note that all implementations of Display, as well as methods named display, utilize ANSI escape sequences. There's currently no way to change this.

No runtime deps