Configure Rust
Replace crates.io with Depsilo's sparse index so Cargo dependencies use the proxy cache.
BEFORE
https://index.crates.ioAFTER
http://localhost:23333/crates/Cargo must replace crates.io with Depsilo. Merely adding a named registry does not change the default source.
Configure the client
Section titled “Configure the client”[source.crates-io]replace-with = "depsilo"
[source.depsilo]registry = "sparse+http://localhost:23333/crates/"The sparse+ prefix is required. Depsilo serves Cargo at /crates/, not /cargo/.
cargo fetchVerify requests
Section titled “Verify requests”-
Check that the instance is ready
终端窗口 curl -fsS http://localhost:23333/ready -
Fetch dependencies in a scratch project
终端窗口 cargo new --quiet /tmp/depsilo-cargo && cd /tmp/depsilo-cargocargo add --quiet serdecargo fetch -
Confirm the traffic in Admin
Check the
/crates/requests in Access logs; repeatingcargo fetchshould hit the cache.
Common questions
Section titled “Common questions”Why not /cargo/?
Section titled “Why not /cargo/?”Depsilo’s Cargo route is /crates/, matching the sparse registry protocol. The wrong path returns 404 rather than falling back upstream.
What about private registries?
Section titled “What about private registries?”Configure each additional registry as its own source. Depsilo only replaces the sources you explicitly point at it.