1 unstable release
Uses old Rust 2015
0.1.0 | Feb 6, 2018 |
---|
#102 in #binaries
4KB
64 lines
Deprecated
This project is no longer under active development. Your best bet might be https://medium.com/@jondot/shipping-rust-binaries-with-goreleaser-d5aa42a46be0. Please let us know if you find a better solution and we'll update that section.
cargo-deliver
What is it?
This will use goreleaser to deploy your Rust binaries to Github/Artifactory/Dockerhub. It's still experimental and will only work once/if Rust support gets added to goreleaser.
Installation
cargo install cargo-deliver
To upgrade:
cargo install --force cargo-deliver
Or clone and build with $ cargo build --release
then place in your $PATH.
Usage
- Add a
.goreleaser.yml
to your project. Here is an example:
rust:
- target:
- x86_64-apple-darwin
binary: cargo-deliver
# Archive customization
archive:
format: tar.gz
replacements:
amd64: 64-bit
darwin: macOS
linux: Linux
This will build your Rust application as a static binary for macOS and as a tar.gz
archive.
For all possible options, see the goreleaser docs.
You can get a list of all possible targets with
rustc --print target-list
- Tag your current commit, e.g.
git tag -a "v0.1.0"
-
If you want to deploy to Github, you need to export a
GITHUB_TOKEN
environment variable, which should contain a GitHub token with the repo scope selected. It will be used to deploy releases to your GitHub repository. Create a token here. -
Run the following command
cargo deliver
Similar tools
- cargo-docker - A cargo subcommand to build Rust code inside a Docker and get the result back.
- cargo-hublish - A cargo subcommand for publishing Rust projects to Github (not supporting different build targets).
Dependencies
~330–520KB