LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

bacon

Background Rust code checker

TLDR

Run the default check job in the current project
$ bacon
copy
Run a specific job
$ bacon [test]
copy
Run clippy lints
$ bacon --job [clippy]
copy
List available jobs
$ bacon --list-jobs
copy
Run in a specific project directory
$ bacon --path [path/to/project]
copy
Initialize a bacon.toml configuration file
$ bacon --init
copy
Open the preferences file path
$ bacon --prefs
copy

SYNOPSIS

bacon [options] [job]

DESCRIPTION

bacon is a background Rust code checker that runs cargo commands in watch mode. It continuously checks your code for compilation errors, warnings, and clippy lints, displaying results in a terminal UI.The tool provides immediate feedback during development without manually running cargo commands. When no ambiguity exists, the job name can be passed directly as a positional argument (e.g. `bacon clippy` instead of `bacon --job clippy`).Default jobs include check (cargo check), clippy (clippy lints), test (run tests), doc (generate documentation), and run (build and run). Custom jobs can be defined in bacon.toml.

PARAMETERS

-j, --job name

Run the specified job. Can also be passed as a positional argument without the flag when unambiguous.
--list-jobs
List all available jobs and exit.
--path dir
Set the project directory (default is current directory).
--config file
Use a specific bacon.toml configuration file.
-w, --watch path
Additional paths to watch for changes.
--init
Create a bacon.toml configuration file in the current project if one does not exist.
--prefs
Create the preferences file if it does not exist and print its path.
-s, --summary
Show a summary of results when finishing.
--no-default-features
Disable default cargo features.
--features features
Comma-separated list of cargo features to enable.
--all-features
Enable all available cargo features.

CAVEATS

Requires the Rust toolchain to be installed. Continuous checking may cause high CPU usage on large projects. The terminal UI requires a compatible terminal emulator.

HISTORY

bacon was created by Denys Séguret (Canop) around 2021 to provide a better development experience for Rust projects with continuous feedback.

SEE ALSO

cargo(1), cargo-watch(1), clippy(1), rustc(1)

Copied to clipboard
Kai