Collects all the resources necessary for successfully packaging our rust project for various targets, across different formats.
The main packaging functionality here is exposed via run.sh -- please refer to the script header there for more details on its usage.
For CI or local use, packaging is best done via the project Makefile, which has convenient (make) targets defined for doing it against all the supported rustc targets as well as package formats.
make packages # from project root
Or to package for a specific target only (across all release formats):
make package-x86_64-unknown-linux-gnu # from project root
Resulting artifacts will be available in the directory packaging/out
, relative to project root. Enjoy!
Other examples, using the scripts here directly:
# produce packages of all supported formats (using glibc based binaries) for x86_64 linux
./cross_build.sh x86_64-unknown-linux-gnu && ./run.sh x86_64-unknown-linux-gnu
# produce archive (using musl based binaries) for x86_64 linux
./cross_build.sh x86_64-alpine-linux-musl && ./run.sh -f archive x86_64-alpine-linux-musl
If you need to build the docker images used during the cross build process, please refer to the documentation on builder-images.
- bash
- git
- cargo
- docker
- dpkg, ldd (optionally, to auto-infer dynamic lib dependencies during debian packaging, via cargo-deb)
The setup here was tested successfully from linux (ubuntu) environments, but it should work well in other environments too, as long as the above requirements are met.
- x86_64-unknown-linux-gnu
- x86_64-alpine-linux-musl
For the list of targets used during project release, please refer to the project Makefile.
- archive (tar.gz for linux targets)
- deb (Debian package)
For the list of formats used during project release (variable by target), please refer to the project Makefile.