Canop / bacon

background rust code check
https://dystroy.org/bacon
GNU Affero General Public License v3.0
1.96k stars 73 forks source link

[feature request] bacon build #238

Closed m4rch3n1ng closed 1 month ago

m4rch3n1ng commented 1 month ago

i use cargo-watch mostly with cargo watch -x build to build my project in the background, so that if i want to run it cargo run is instantaneous. i looked and, to me, it doesn't seem possible to do this with bacon currently, as $ bacon build gives me an Error: job not found: "build"

alternatives considered:

Canop commented 1 month ago

bacon is meant to be configured, you can add the jobs of your choice.

For example:

[jobs.build]
command = [
    "cargo", "build",
    "--color", "always",
]
need_stdout = false

With this job added, you can launch bacon build.

Please have a look at the documentation: https://dystroy.org/bacon/config/

alerque commented 1 month ago

You can define any jobs you want in your config:

[jobs.build]
command = ["cargo", "build"]

You can also as keybindings to jump to the job. There are examples linked from the home page.

m4rch3n1ng commented 1 month ago

ah, somehow didn't think of that. makes sense.