From Artifactory version 7.46.3, Cargo sparse indexing is supported. Sparse Indexing allows you to control the connections that are entered into the index database. Sparse indexing also allows for:
Faster build times, since no Git clones/ pulls are involved
Using a proxy for Remote Cargo Repositories.
Note
Cargo sparse indexing is supported from Cargo version 1.68 and higher (from Cargo 1.60 it is supported as a nightly feature).
To enable Cargo sparse indexing:
Via REST API: Add the
"cargoInternalIndex": true
flag to the Repository Configuration JSON file.Via the JFrog Platform UI: Select the Enable sparse index support checkbox in the General Settings section of the Cargo Repository Basic tab.
For existing repositories, reindex after enabling sparse indexing. For new repositories, no initialization time is required, as no Git clone is created behind the scenes.
Rules and Guidelines
When configuring as a Smart Remote repository, the URL should use the following syntax:
http://[domain]/artifactory/cargo-local
While the registry URL should use this syntax:
http://domain/artifactory/api/cargo/cargo-local/index
To use the official Rust Remote Repository URL, create a remote repository with the URL and registry URL https://index.crates.io
.
For more information, see the Rust documentation.