# Oci.zig — pure-Zig OCI Distribution Spec v1.1 client

**URL:** <https://ziggit.dev/t/oci-zig-pure-zig-oci-distribution-spec-v1-1-client/17435>\
**Category:** Showcase\
**Tags:** llm, zig-0-16, community\
**Created:** [September 1, 2026, 7:34am UTC](https://ziggit.dev/t/oci-zig-pure-zig-oci-distribution-spec-v1-1-client/17435 "2026-09-01T07:34:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmvarela](https://ziggit.dev/user_avatar/ziggit.dev/vmvarela/32/8179_2.png) [@vmvarela](https://ziggit.dev/u/vmvarela)\
**Post date:** [September 1, 2026, 7:34am UTC](https://ziggit.dev/t/oci-zig-pure-zig-oci-distribution-spec-v1-1-client/17435/1 "2026-09-01T07:34:59Z")

</div>

# oci.zig

> **[GitHub - vmvarela/oci.zig: A Zig library to interact with OCI registries](https://github.com/vmvarela/oci.zig)**
>
> A Zig library to interact with OCI registries

A pure Zig (std-only) client library for the _OCI Distribution Specification v1.1_ (Docker Hub, GHCR, ECR, etc.).

No C dependencies; TLS is handled directly via `std.crypto`.

## Features

- Manifest and blob operations: monolithic, chunked-stream, streaming, and range pulls/pushes.
- Auth, tag listing, cross-repo blob mounts, and manifest deletion.
- Referrers API support with automatic fallback to tag-schema for older registries.

## Implementation details

- **API design:** Ported from [`oras-project/rust-oci-client`](https://github.com/oras-project/rust-oci-client) (v0.17.0) to keep the ergonomics, error handling, and edge cases (like 202 on deletion) aligned with a proven implementation.
- **Zig 0.16 `std.Io`:** Implements the HTTP layer against the new IO model.
- **Memory ownership:** Pulled resources (manifests, configs, layers) are managed via internal arenas and freed with a clean `deinit()`, keeping the caller’s allocator tidy.
- **Focused scope:** Only the distribution protocol. No local image building, CAS, or container runtime logic.

## Compatibility

- Zig `0.16.0`

## Notes on development

Written with LLM assistance driven by strict specs (`SPEC.md`), unit tests, and integration test suites running against a live local `zot` registry.
