81 releases (stable)

new 3.3.0 Nov 16, 2024
3.1.2 Oct 29, 2024
2.21.0 Sep 14, 2024
2.18.2 May 31, 2024
0.6.0 Nov 15, 2020

#136 in Development tools

Download history 496/week @ 2024-07-27 976/week @ 2024-08-03 1134/week @ 2024-08-10 709/week @ 2024-08-17 630/week @ 2024-08-24 586/week @ 2024-08-31 443/week @ 2024-09-07 1028/week @ 2024-09-14 548/week @ 2024-09-21 1005/week @ 2024-09-28 1457/week @ 2024-10-05 1299/week @ 2024-10-12 1305/week @ 2024-10-19 1376/week @ 2024-10-26 1555/week @ 2024-11-02 721/week @ 2024-11-09

5,398 downloads per month

AGPL-3.0

715KB
6.5K SLoC

bacon

Latest Version site Chat on Miaou License: AGPL v3

bacon is a background rust code checker.

It's designed for minimal interaction so that you can just let it run, alongside your editor, and be notified of warnings, errors, or test failures in your Rust code.

screenshot

Documentation

The bacon website is a complete guide.

Below is only a short overview.

install

cargo install --locked bacon

Run this command too if you want to update bacon. Configuration has always been retro-compatible so you won't lose anything.

check the current project

bacon

That's how you'll usually launch bacon, because other jobs like test, clippy, doc, your own ones, are just a key away: You'll hit c to see Clippy warnings, t for the tests, d to open the documentation, etc.

check another project

bacon --path ../broot

or

bacon ../broot

check all targets (tests, examples, benches, etc)

bacon --job check-all

When there's no ambiguity, you may omit the --job part:

bacon check-all

run clippy instead of cargo check

bacon clippy

This will run against all targets like check-all does.

run tests

bacon test

or bacon nextest if you're a nextest user.

bacon test

When there's a failure, hit f to restrict the job to the failing test. Hit esc to get back to all tests.

define your own jobs

First create a bacon.toml file by running

bacon --init

This file already contains some standard jobs. Add your own, for example

[jobs.check-win]
command = ["cargo", "check", "--target", "x86_64-pc-windows-gnu", "--color", "always"]

or

[jobs.check-examples]
command = ["cargo", "check", "--examples", "--color", "always"]
watch = ["examples"] # src is implicitly included

Don't forget the --color always part: bacon uses style information to recognize warnings and errors.

and run

bacon check-win

or

bacon check-examples

The bacon.toml file may evolve with the features and settings of your project and should be added to source control.

Licences

Bacon is licenced under AGPL-3.0. You're free to use it to compile the Rust projects of your choice, even commercial.

The logo is designed by Peter Varo and licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. license

Dependencies

~26–38MB
~588K SLoC