I'm slowly finding time to get back to trying to replace Python with Rust as my "I'm feeling tired and un-motivated and just want to hack on something with as few papercut annoyances as possible" language and, as part of that, I've started to brainstorm the template applicator/project generator side of things.
Does anyone know of any prior work on the idea of a project generator tool which maintains a
cargo build of the template with some dummy
Cargo.toml values, so a primed
target folder can be copied into a fresh project to accelerate the first
cargo build or
I'm not talking sccache here. I'm already experimenting with sccache as a globally shared artifact cache and I can't get the
rm -rf target; cargo build time for my current boilerplate dependency tree below 17.8 seconds (with ~22 seconds being more typical), while editing
Cargo.toml to rename the crate and re-running
cargo build takes about 2 seconds. (Athlon II X2 270 with 16 gigs of RAM and a 7200 RPM hard drive.)
I'm still researching on the best SSD to meet my needs, so I haven't yet checked how quickly a
target like that could be copied on an SSD, but a hot disk cache can do it in about a second, and I imagine cheating using an overlay filesystem (possibly with deferred/background copy to detach the new project's
target from the original later) would be effectively instantaneous.
(I'm also thinking that, If I write my own such tool, it'd be a combination of virtualenvwrapper's
workon, so that
whatever projname would either launch my preferred development environment or, if no such project is found, offer to create one.)