Now that you have the structure of the crate in place, you have a number of ways to upload it to your Gemfury account. You can use the Dashboard, cURL, or the Gemfury CLI.
Pushing from terminal
You already have a prebuilt crate after running cargo package, so let’s upload
it directly from a terminal:
curl -F package=@target/package/CRATE_NAME-0.1.0.crate \
https://TOKEN@push.fury.io/USERNAME/
If you’ve installed the Gemfury CLI, you can also push with:
fury push CRATE_NAME-0.1.0.crate --as USERNAME
Pushing from a browser
You can upload your crates via Gemfury Dashboard. Open the Upload dialog or just drag-and-drop the crate directly into the browser window.
Pushing with Cargo (one-time/inline)
For one-time publishes or CI/CD environments, you can publish without pre-configuring your registry. Gemfury supports Cargo’s native crate publishing, so you can run the following command without prebuilding the crate:
cargo publish \
--index "sparse+https://crates.fury.io/USERNAME/" \
--token "$FURY_AUTH"
As always, we recommend storing secrets securely, and passing them via environment variables, or similar configuration mechanisms.
Pushing with Cargo (configured registry)
For repeated interactions, we recommend saving your registry configuration to avoid specifying the index URL each time.
Add the following to your project’s .cargo/config.toml file:
[registries.fury]
index = "sparse+https://crates.fury.io/USERNAME/"
credential-provider = "cargo:token"
You can now publish this crate with this command:
CARGO_REGISTRIES_FURY_TOKEN=TOKEN \
cargo publish --registry fury