bytecodealliance / bytecodealliance/wasm-pkg-tools
Add capability to specify cache directory for registry
- Dominant language
- Rust
- Stars
- 160
- Forks
- 42
- Avg merge
- 7h 57m
- Merged PRs (30d)
- 3
Description
I've found that a common footgun for myself during dev workflows is that I "poison" my local wkg cache with locally built packages while I do dev work. Then these dev packages find their way into later `wkg fetch`es when I just want to be pulling the latest from OCI.
Adding the ability to specify a cache directory for a registry could help here. I can specify a separate cache for my local registry where my locally versioned dev packages are built/published and dev scripts and such can specifically point `wkg fetch`es to this cache. Other workflows continue to use `wkg fetch` with the default cache, which will only ever contain packages from OCI that have been published and released.
e.g.:
```
default_registry = "acme.registry.com"
[registry."acme.registry.com".oci]
auth = { username = "open", password = "sesame" }
protocol = "https"
[registry."acme.registry.com".local]
root = "/a/path"
cache = "/not/default/wkg-cache/loc"
```
Contributor guide
Assessment
This issue has not been assessed yet.