Skip to main content

Module server

Module server 

Source
Expand description

Axum HTTP server implementing the Nix binary cache protocol.

Endpoints:

  • GET /nix-cache-info — cache metadata
  • GET /{hash}.narinfo — narinfo metadata
  • PUT /{hash}.narinfo — upload narinfo
  • GET /nar/{path} — download NAR blob
  • PUT /nar/{path} — upload NAR blob

Structs§

AppState
Shared application state for all handlers.

Functions§

build_router
Build the axum router for the binary cache server.
serve
Start the cache server and listen for connections.