Cargo and installation of ancilliary files


Cargo is fine building debug and release versions of an application. I can even install the executable with:

cargo install --root=$HOME/Built

However the project has other files that need installing in specific places. CMake, Meson, SCons, even Make have ways of doing this, does Cargo?

Obvious alternative is a bash script, but that seems so second rate.


No :frowning:

In general, Cargo has a very limited support for installing things, and you can’t customize it at all.

It would be awesome to build a tool, which could automate the release process for Rust applications (prepare binary releases for various platforms, create .deb and .msi packages, process resources, sign and manifest applications), but, as far as I know, no such tool exists at the moment.


Cargo currently doesn’t do that and I currently don’t think cargo-install should do that. Why? Because encoding these “specific places” in cargo itself is not the way to go…

The CLI working group has been talking about ways to distribute apps for a bit. You might want to check out/chime in at


I’ll take a look. Clearly installation can be very OS dependent, and indeed personal. However I am used to SCons, Meson, and Gradle, all of which have the notion of project as much as build at their heart. Preparing a release (separate from anything GitHub, GitLab, or BitBucket do) and doing a local installation.

I think Cargo needs to be decisive, it’s a bit of an “all or nothing” situation really. The danger is the current situation where Cargo has the notion of install but doesn’t support project install. If there is no intention to go as far as SCons, Meson, or Gradle, then Cargo’s install --root should be removed to make it clear that install isn’t actually supported. Then it is clear people just have to write their own shell script.


SCons and CMake provide tools for building an installation, but it tends to be quite a polava to make it general, fine for a specific platform, annoying to make it general. Meson tries to abstract this and do the right thing, but does appear to be Linux specific, but does cope with macOS.

To be general an installation tool needs to be OS specific. :frowning: