Skip to content

docs: Add Zig package cache guidance#76

Open
lox wants to merge 1 commit into
buildkite:mainfrom
lox:lox/zig-content-cache
Open

docs: Add Zig package cache guidance#76
lox wants to merge 1 commit into
buildkite:mainfrom
lox:lox/zig-content-cache

Conversation

@lox

@lox lox commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Zig users can already route package source downloads through content-cache, but the README does not make that path obvious. That makes it easy to assume content-cache needs a new Zig-specific remote build cache protocol, even though Zig currently uses URL-based package fetches and local filesystem build caches.

This documents the supported setup: use the existing Git proxy for git+https dependencies, use /fetch for tarball dependencies, and keep ZIG_GLOBAL_CACHE_DIR on persistent CI storage for compile output reuse.

Validation:

  • git diff --check
  • mise run test

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2844726b21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
Comment on lines +145 to +146
# git+https dependencies can use the Git proxy through Git's URL rewrite.
git config --global url."http://localhost:8080/git/github.com/".insteadOf "https://github.com/"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a Zig-visible proxy URL for git dependencies

When the dependency URL in build.zig.zon is git+https://github.com/..., this git config url.*.insteadOf setting is ignored because Zig's package fetcher handles git+http(s) itself (it strips the git+ prefix and opens its own HTTP Git session in Package/Fetch.zig:initResource) rather than invoking the Git CLI. In that scenario zig build still contacts GitHub directly, so users following this setup get no /git caching and CI environments relying on the proxy/allowlist will still fail or bypass content-cache.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant