rustaceans, is there any clever way to preserve co...
# development
f
rustaceans, is there any clever way to preserve compiled artifacts (unless automating moving in/out files out of the working directory)? I switch between branches and would love to avoid re-compiling Rust code (yes, I run with
MODE=debug
) 🙂
h
It sounds like you want some sort of Rust-supporting "plugin" for a "build system" of some kind... 😉
🤣 4
👖 1
🚑 1
f
I am sure other people developing for Pants switch between branches often and was hoping for an existing solution to avoid re-compiling artifacts between the branch jumps
but maybe there isn't much one can do - files are simply overwritten 🙂
b
In leui of pants support, I've heard (very) good things about https://github.com/mozilla/sccache as a cache for Rust compiler invocations. (It came about after I stopped using Rust a lot though, so I cannot give a first hand review.)
(Although it seems to have a bunch of Rust caveats: https://github.com/mozilla/sccache#rust 🤷 )
f
thanks, @broad-processor-92400, this is helpful. I'll explore this and other caching tools, maybe there's something that would work with Pants
b
I believe if you look backwards in time Pants used to have a cache of the engine based on the hash of files, but that got pulled. I suspect for size concerns?