Cargo
Avrea caches crates from crates.io so that cargo build and cargo fetch
resolve dependencies from colocated cache on repeat runs.
On Avrea runners
Section titled “On Avrea runners”Cargo is pre-configured via ~/.cargo/config.toml:
[registries.cache]index = "sparse+https://cache.avrea.com:8443/cargo/"
[source.crates-io]replace-with = "cache"Your workflow needs no changes:
jobs: build: runs-on: avrea-ubuntu-latest steps: - uses: actions/checkout@v7 - run: cargo build --releasePublishing to crates.io
Section titled “Publishing to crates.io”Because crates.io is routed through the cache, cargo publish needs the
target registry named explicitly:
- run: cargo publish --registry crates-ioWithout it, Cargo stops with crates-io is replaced with remote registry cache. Crates whose package.publish names a single other registry need no
change.
Manual setup
Section titled “Manual setup”Create or append to ~/.cargo/config.toml:
[registries.cache]index = "sparse+https://cache.avrea.com:8443/cargo/"
[source.crates-io]replace-with = "cache"