Hacker News new | past | comments | ask | show | jobs | submit login
Bacon – a background Rust code checker (dystroy.org)
44 points by sea-gold on March 30, 2024 | hide | past | favorite | 11 comments



I used to code with sublime and compile from time to time to check with compiler. Sometimes I’d go for an hour without running cargo and somehow it worked fine.

I have been doing rust since about 2016, in and out, and never questioned the approach but the tooling had improved dramatically in recent years.

I have switched to VSCode with rust-analyser and a few other extensions, which not only display errors but also types of variables which seems like a killer feature for me because it makes it so much easier.

I wonder what’s the motivation behind bacon given that it looks a bit outdated to program in rust this way in 2024.


I use it together with VS code and rust-analyser. I like having a view of the entire project - if I break something in a file I don't have open in the editor it is more obvious in the bacon output. You can also switch it to test mode.

However compared to cargo watch -c -x {check,test} it is only marginal improvement.


One issue I'm having with bacon, that's why I don't use if often, is that after a while it seems that it stop working, I need to restart so it would run after a project file changes, also I use most of the time cargo watch.


If you open the "problems" menu in the bottom bar (a tab on the same menu as the terminal), you should see all the error for your whole project.


I agree, bacon doesn't seem significantly different from the VSCode problems pane — which also hyperlinks to the locations in question — except perhaps the way problems are sorted between the two.


It isn't outdated. I run lsp and bacon when working. You can get bacon to run clippy for you, which is also really good to use.


Working on an OS in Rust, rust-analyzer chokes. A _lot_. I end up just having to run a compilation to see what I've broken.

Haven't tried it yet but it looks like it'll be an invaluable part of my toolbox. Thanks for posting this!


I love LSP as much as the next person, but bacon's flicker-free zero config clippy watching basically TAUGHT me Rust!


I use this exclusively in my IDE (RustRover). I've never had a recent IDEA that had a usable "problems" or whatever window. I wish there was a bacon for Go, too. I check for compile problems in Go from the terminal with AwesomeConsole or whatever it's called (in GoLand).


Bacon is fantastic. I always have it running when I'm writing Rust. It's very fast/performant.


I'd have assumed that using a language server would avoid the need for using something like this, but as a frequent user of ibazel (sort of inotify-watch+make for bazel) I can see how this can be enough to get productive without an editor that fully supports LSP




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: