https://github.com/Canop/bacon
background code checker
https://github.com/Canop/bacon
cargo check compilation hacktoberfest rust terminal
Last synced: 19 days ago
JSON representation
background code checker
- Host: GitHub
- URL: https://github.com/Canop/bacon
- Owner: Canop
- License: agpl-3.0
- Created: 2020-10-29T12:53:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-20T05:42:58.000Z (26 days ago)
- Last Synced: 2025-03-25T20:08:53.980Z (21 days ago)
- Topics: cargo, check, compilation, hacktoberfest, rust, terminal
- Language: Rust
- Homepage: https://dystroy.org/bacon
- Size: 3.07 MB
- Stars: 2,370
- Watchers: 12
- Forks: 91
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - Canop/bacon - background code checker (Rust)
- awesome-rust - bacon - watch (Development tools / Web Servers)
- awesome-rust-cn - bacon - watch (开发工具 Development tools / Web服务器 Web Servers)
- awesome-rust - bacon - background rust code checker, similar to cargo-watch (Development tools / Web Servers)
- fucking-awesome-rust - bacon - background rust code checker, similar to cargo-watch (Development tools / Web Servers)
- fucking-awesome-rust - bacon - background rust code checker, similar to cargo-watch (Development tools / Web Servers)
- awesome-repositories - Canop/bacon - background code checker (Rust)
README
![bacon][logo]
[logo]: img/logo-text.png?raw=true "bacon"
[![Latest Version][s1]][l1] [![site][s4]][l4] [![Chat on Miaou][s2]][l2] [![License: AGPL v3][s3]][l3]
[s1]: https://img.shields.io/crates/v/bacon.svg
[l1]: https://crates.io/crates/bacon[s2]: https://dystroy.org/chat-shield.svg
[l2]: https://miaou.dystroy.org/4683?bacon[s3]: https://img.shields.io/badge/License-AGPL_v3-blue.svg
[l3]: https://www.gnu.org/licenses/agpl-3.0[s4]: https://dystroy.org/dystroy-doc-pink-shield.svg
[l4]: https://dystroy.org/bacon**bacon** is a background 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.

# Documentation
The **[bacon website](https://dystroy.org/bacon)** 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.
Some features are disabled by default. You may enable them with
cargo install --features "clipboard sound"
## 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.

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
```toml
[jobs.check-win]
command = ["cargo", "check", "--target", "x86_64-pc-windows-gnu"]
```or
```toml
[jobs.check-examples]
command = ["cargo", "check", "--examples"]
watch = ["examples"] # src is implicitly included
```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.
## Optional features
Some bacon features can be disabled or enabled at compilation:
* `"clipboard"` - disabled by default : necessary for the `copy-unstyled-output` internal
* `"sound"` - disabled by default : necessary for the `play-sound` internal## Licences
Bacon is licenced under [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.en.html).
You're free to use it to compile the Rust projects of your choice, even commercial.The logo is designed by [Peter Varo][pv] and licensed under a
[Creative Commons Attribution-ShareAlike 4.0 International License][cc-lic].
[![license][cc-img]][cc-lic][pv]: https://petervaro.com
[cc-lic]: https://creativecommons.org/licenses/by-sa/4.0
[cc-img]: https://i.creativecommons.org/l/by-sa/4.0/80x15.png