Introducing cargo-quickinstall

Hi all,

I have published a new cargo plugin called cargo-quickinstall.

The intention is that you can type

cargo quickinstall $CRATE

instead of

cargo install $CRATE

and it will install pre-compiled binaries instead of compiling them on your machine.

cargo install cargo-quickinstall is also super-quick. On my machine, "Updating index" takes 13 seconds, and the rest takes 1 second. This means that you can use it to speed up your CI pipeline if you depend on any binary crates.

The crate builder is currently working its way down the 100 most popular binary crates (1 per hour on GitHub Actions, to avoid taking the piss), but it also collects statistics of which crates people have asked for, so I can build anything that people request a lot.

I don't currently support Windows, and I would really love some help with that.

I would also really love some feedback to help shape my roadmap. Please comment here or on Gitter if you have any thoughts.


So it's pulling the built binaries from artifacts published via Github Actions?

Basically yes. I host them on bintray because github actions artifacts have a limited lifetime (and homebrew bottles are hosted on bintray, so I thought "why not?"). Workflow lives here if you're interested:

Would the same technique work for cargo build and cargo test?

Hi. Sorry for the delay. I honestly don't know, but I suspect it would be a lot harder.

With cargo install, people mostly only care about a single compiled binary file, and it doesn't really matter if they've been compiled with an old version of the compiler or something. It's also more okay to say "This binary was compiled with default features. If you have a problem with that then you can build it yourself."

With cargo build, you need to precompile dependencies in a kind-of tree shape, and people expect to have the source-code floating around as well, so that their IDE can do its own analysis.

I'm now trying to think how you would evaluate how effective a cargo-quickbuild tool would be. I suppose you could take the Cargo.lock from a bunch of git repos, and then build them all and see how many of the resulting target dirs contain the same built assets? You would end up building something like a centralised cargo-chef, I think. There might be a way split up the Cargo.lock file into a tree, and bring in each subtree as its own tarball.

If you can get a proof-of-concept to work, then I'd be happy to host it under the cargo-quickinstall umbrella.

people expect to have the source-code floating around as well, so that their IDE can do its own analysis.

TBH I was thinking purely about speeding up CI.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.