cargo: allow using a local registry instead of crates.io #14823
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Distros want to build packages with known versions of crates, and want to store them in the local filesystem.
This is usually achieved by placing a custom Cargo configuration in the build sandbox. For Meson's Cargo interpreter to achieve the same thing, add a
-Drust.crates_io_dir
option. The interpreter redirects the crates.io registry to the directory through a new internal-only'dir'
wrap type.TODO: add a similar option to
meson subprojects
, which requires pretty much rewriting half of the PR :)