3 ms·
Having multiple Cargo.toml files across workspaces wreaks absolute havoc with editors like VS Code, which perform builds automatically while you work. Makes the
by michaelscott 2y ago
Having multiple Cargo.toml files across workspaces wreaks absolute havoc with editors like VS Code, which perform builds automatically while you work. Makes the debug cycle waaay slower, which is a tradeoff for the faster compile times I suppose?
Unless someone has a way of handling workspaces in VS Code, in which case please let me know
- 7bit 2y agoThere's a setting that disabled checks on save or something. I found that somewhere it it speeds up everything so much. I'm too noob to tell you if it has any downsides tho
- FridgeSeal 2y agoI can answer this! As suggested in this article, have your dependencies and their versions fixed at your very top level cargo.toml. Every other workspace, should only be referencing via “dependency.workspace = true”. Set your VSCode workspace to the directory with your top level cargo.toml in it. At my work, we have a pretty massive core library, shared between 10-ish apps and I have it laid out as above, and don’t have major issues with compilation times.
- michaelscott 2y agoNah this doesn't work. Codebase is set up in this way already but VS Code just isn't having it :-\