I am facing this specific problem: I have a crate library that needs to use some files in order to function. These files are available in the source distribution, so it works out of the box when my crate is included as a dependency, and the user runs their project from source, with e.g. cargo run
or cargo test
, because the source of my crate is available.
But it breaks the CI of one user, because the project is compiled in one machine and is executed in another, via cargo nextest archive
, where the source is no longer available, so my library can't find the files it needs.
The problem is more general than this CI issue, because in the end, it should be possible to distribute the software without the source, so there must be some way to distribute the resource files with it. Is there some cargo facility that allows me to specify what files should be installed with the binaries when installing/distributing?