Getting started on Gemfury with Rust Crates βeta

Install crates with Cargo

Using Gemfury with Cargo is easy, just add a registries block with your Repo-URL to the project’s .cargo/config.toml file:

[registries.fury]
index = "sparse+https://crates.fury.io/USERNAME/"
credential-provider = "cargo:token"

Once you’ve defined the registry, you can set individual dependencies in the project’s Cargo.toml to be retrieved from your Gemfury Crates registry:

[dependencies]
your-crate = { version = "1.0", registry = "fury" }
Authenticating for private crates

To access private crates, you will need to authenticate using a deploy token. You can do this with an environment variable. The environment variable name is derived from your registry name. Since we chose fury, we authenticate as follows:

CARGO_REGISTRIES_FURY_TOKEN=TOKEN \
  cargo build