Skip to content

Add Julia Pkg server support#117

Open
andrew wants to merge 1 commit into
mainfrom
julia-support
Open

Add Julia Pkg server support#117
andrew wants to merge 1 commit into
mainfrom
julia-support

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented May 12, 2026

Closes #116.

Adds a /julia/* handler implementing the Julia Pkg server protocol so the proxy can sit behind JULIA_PKG_SERVER. The protocol is small and almost entirely content-addressed:

  • /registries (and .eager / .conservative) is the only mutable endpoint and goes through the metadata cache.
  • /registry/{uuid}/{hash}, /package/{uuid}/{hash} and /artifact/{hash} are immutable gzip tarballs and are stored as artifacts.
  • /meta is passed through.

Packages are identified on the wire by UUID and git tree hash rather than name and version. To keep the cache and dashboard readable the handler lazily downloads the General registry tarball, parses the [packages] table from Registry.toml, and stores packages under their human name (pkg:julia/Plots@<tree-sha>). The map is held in memory, refreshed in the background whenever a client fetches a newer registry hash, and skipped when the hash is unchanged. Unknown UUIDs fall back to the UUID string. BurntSushi/toml was already an indirect dependency and is now direct.

Verified locally against Julia 1.12.6 with a fresh depot: Pkg.add(["JSON3","Zstd_jll"]) installs through the proxy including the Zstd binary artifact, and a second install from a wiped depot is served entirely from cache.

Cooldown is not supported since the protocol carries no publish timestamps. The name map is in-memory only, so a cold restart while upstream is unreachable will fall back to UUIDs until /registries is reachable again; both could be follow-ups if anyone needs them.

Docs updated: README ecosystem table, usage section and endpoint list, the dashboard /install page, ecosystem filter and badge, and the architecture diagram count.

- Implement /julia/* handler for the Pkg server protocol
  (registries, registry, package, artifact, meta)
- Resolve package UUIDs to names by parsing Registry.toml from
  the General registry tarball, with a hash-guarded background
  refresh on registry updates
- Wire into router, ecosystem list, install page, badge styles
- Update README and architecture docs
@andrew andrew mentioned this pull request May 12, 2026
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.

Julia packages

1 participant