Download Only Pre-Compiled Binaries of Rust Crates

Viewed 120

I use multiple rust packages in my desktop. To install those packages i use

cargo install fd-find sd ripgrep bat exa git-delta du-dust choose alacritty nu tealdeer broot

To update those packages , i use cargo-update sub-command.

cargo install cargo-update
cargo install-update -a

Is there any command or sub-command or technique i can use to download only pre-compiled binaries (instead of downloading the source code and compiling in my machine) to install or update rust crates.

1 Answers

Since crates can be compiled with or without certain features which result in different code, there isn't any mechanism to up- or download pre-compiled crates. On top of that, the list of supported targets is very long which would make it very likely that the platform you're on doesn't have pre-compiled binaries.

Finally, there'd need to be additional mechanisms to sign the code and verify that the pre-compiled code matches the source code.

So all in all there are several obstacles that render implementing this impractical.

Related