bacon is a background rust code checker.
It's designed for minimal interaction so that you can just let it run, side to your editor, and be notified of warnings, errors, or test failures in your Rust code.
It conveys the information you need even in a small terminal so that you can keep more screen estate for your other tasks.
You don't have to remember commands: the essential ones are listed on bottom and the few other ones are shown on a hit on the h key.
cargo install --locked bacon
Launch bacon in a terminal you'll keep visible
This launches the default job, most usually based on
cargo check :
Bacon will watch the source directories and shows you the errors and warnings found by the cargo command.
You may decide to launch and watch tests by either hitting the t key, or by launching bacon with
You can configure and launch the jobs of your choice: tests, specific target compilations, examples, etc. and look at the results while you code.
You may also open the
cargo doc in your browser with the d key.
bacon --help to see all launch arguments, and read the cookbook.
See config for details, but here's the crust:
prefs.toml file lets you define key bindings, or always start in summary mode or with lines wrapped.
To create a default preferences file, use
$EDITOR $(bacon --prefs)
You'll define in the
bacon.toml file the jobs you need, perhaps an example to check, a run with special parameters, or the settings of clippy, as well as shortcuts to run those jobs.
bacon.toml file by running
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"]