Deploy a Cargo Package Using cURL

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

To deploy a package using a cURL request.

Deploying Cargo Crates

curl -uadmin:password -XPUT "http://localhost:8082/artifactory/cargo-local/crates/package_1.0.0.crate" -T package_1.0.0.crate

When deploying directly (PUT request to a specific path), make sure the target path is a valid Cargo path.

crates/{package_name}/{package_name}-{version}.crate

Note that deploying a package to a different path will not identify the package as Cargo package, and will not invoke metadata indexing.

Also, as Artifactory relies on the information in the cargo.toml file, make sure that it contains the dependencies' registry URLs, if applicable. If you are not sure, it is always recommended to use the cargo publish command.