Index Cargo Repositories Using Sparse Indexing

JFrog Artifactory Documentation

JFrog Artifactory
Content Type
User Guide

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.


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.Repository Configuration JSON

  • 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

For more information, see the Rust documentation.