cargo-cache | manage cargo cache , print | DevOps library
kandi X-RAY | cargo-cache Summary
kandi X-RAY | cargo-cache Summary
Display information on the cargo cache (~/.cargo/ or $CARGO_HOME). Optional cache pruning.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cargo-cache
cargo-cache Key Features
cargo-cache Examples and Code Snippets
Community Discussions
Trending Discussions on cargo-cache
QUESTION
How do I specify another directory where cargo keeps the unpacked sources, e.g. on Windows this is %userprofile%/.cargo/registry/src
?
I working that is going to be a collection of crates like:
...ANSWER
Answered 2019-May-06 at 10:50Looks like this is possible. I think it called "vendoring" and repositories like Fuchsia and Mozilla has source copy of third-party crates in their repositories. This is what I have found:
- Cargo supports "Source replacement" thing configured in .cargo/config, which can be in a project relative dir:
With this configuration Cargo attempts to look up all crates in the directory "vendor" rather than querying the online registry at crates.io. Using source replacement Cargo can express:
Vendoring - custom sources can be defined which represent crates on the local filesystem. These sources are subsets of the source that they're replacing and can be checked into packages if necessary.
Mirroring - sources can be replaced with an equivalent version which acts as a cache for crates.io itself.
- There is a tool https://github.com/alexcrichton/cargo-vendor that can used to populate the directory with source codes of the dependencies:
Simply run
cargo vendor
inside of any Cargo project:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cargo-cache
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page