Advent of Code for 2025!
at main 114 lines 3.5 kB view raw
1# This is a configuration file for the bacon tool 2# 3# Complete help on configuration: https://dystroy.org/bacon/config/ 4# 5# You may check the current default at 6# https://github.com/Canop/bacon/blob/main/defaults/default-bacon.toml 7 8default_job = "check" 9env.CARGO_TERM_COLOR = "always" 10 11[jobs.check] 12command = ["cargo", "check"] 13need_stdout = false 14 15[jobs.check-all] 16command = ["cargo", "check", "--all-targets"] 17need_stdout = false 18 19# Run clippy on the default target 20[jobs.clippy] 21command = ["cargo", "clippy"] 22need_stdout = false 23 24# Run clippy on all targets 25# To disable some lints, you may change the job this way: 26# [jobs.clippy-all] 27# command = [ 28# "cargo", "clippy", 29# "--all-targets", 30# "--", 31# "-A", "clippy::bool_to_int_with_if", 32# "-A", "clippy::collapsible_if", 33# "-A", "clippy::derive_partial_eq_without_eq", 34# ] 35# need_stdout = false 36[jobs.clippy-all] 37command = ["cargo", "clippy", "--all-targets"] 38need_stdout = false 39 40# This job lets you run 41# - all tests: bacon test 42# - a specific test: bacon test -- config::test_default_files 43# - the tests of a package: bacon test -- -- -p config 44[jobs.test] 45command = ["cargo", "test"] 46need_stdout = true 47 48[jobs.nextest] 49command = [ 50 "cargo", "nextest", "run", 51 "--hide-progress-bar", "--failure-output", "final" 52] 53need_stdout = true 54analyzer = "nextest" 55 56[jobs.doc] 57command = ["cargo", "doc", "--no-deps"] 58need_stdout = false 59 60# If the doc compiles, then it opens in your browser and bacon switches 61# to the previous job 62[jobs.doc-open] 63command = ["cargo", "doc", "--no-deps", "--open"] 64need_stdout = false 65on_success = "back" # so that we don't open the browser at each change 66 67# You can run your application and have the result displayed in bacon, 68# if it makes sense for this crate. 69[jobs.run] 70command = [ 71 "cargo", "run", 72 # put launch parameters for your program behind a `--` separator 73] 74need_stdout = true 75allow_warnings = true 76background = true 77 78# Run your long-running application (eg server) and have the result displayed in bacon. 79# For programs that never stop (eg a server), `background` is set to false 80# to have the cargo run output immediately displayed instead of waiting for 81# program's end. 82# 'on_change_strategy' is set to `kill_then_restart` to have your program restart 83# on every change (an alternative would be to use the 'F5' key manually in bacon). 84# If you often use this job, it makes sense to override the 'r' key by adding 85# a binding `r = job:run-long` at the end of this file . 86# A custom kill command such as the one suggested below is frequently needed to kill 87# long running programs (uncomment it if you need it) 88[jobs.run-long] 89command = [ 90 "cargo", "run", 91 # put launch parameters for your program behind a `--` separator 92] 93need_stdout = true 94allow_warnings = true 95background = false 96on_change_strategy = "kill_then_restart" 97# kill = ["pkill", "-TERM", "-P"] 98 99# This parameterized job runs the example of your choice, as soon 100# as the code compiles. 101# Call it as 102# bacon ex -- my-example 103[jobs.ex] 104command = ["cargo", "test", "--example"] 105need_stdout = true 106allow_warnings = true 107 108# You may define here keybindings that would be specific to 109# a project, for example a shortcut to launch a specific job. 110# Shortcuts to internal functions (scrolling, toggling, etc.) 111# should go in your personal global prefs.toml file instead. 112[keybindings] 113# alt-m = "job:my-job" 114c = "job:clippy-all" # comment this to have 'c' run clippy on only the default target