{"article":{"slug":"introducing-casita-a-content-addressed-store-for-source-code-and-build-artifacts","title":"Introducing Casita: A content-addressed store for source code and build artifacts","subtitle":null,"summary":"Domen Kožar introduces Casita, a content-addressed object store for source code and build artifacts—an argument for rethinking Nix-style packaging from the package manager up.","content_type":"blog_post","language":"en","canonical_url":"https://casita.rs/blog/introducing-casita-a-content-addressed-store-for-source-code-and-build-artifacts/","author":{"name":"Domen Kožar","url":"https://casita.rs/","person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Casita","url":"https://casita.rs/","listing_slug":null,"listing":null},"topics":[{"name":"Software Engineering","slug":"software-engineering","url":"https://listedarticles.com/topics/software-engineering"},{"name":"Build Systems","slug":"build-systems","url":"https://listedarticles.com/topics/build-systems"},{"name":"Open Source","slug":"open-source","url":"https://listedarticles.com/topics/open-source"},{"name":"Infrastructure","slug":"infrastructure","url":"https://listedarticles.com/topics/infrastructure"},{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":1723,"reading_minutes":7,"published_at":"2026-09-27T00:00:00.000Z","added_at":"2026-09-28T09:14:19.317Z","updated_at":"2026-09-28T09:14:19.317Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":false},"profile_url":"https://listedarticles.com/articles/introducing-casita-a-content-addressed-store-for-source-code-and-build-artifacts","markdown_url":"https://listedarticles.com/articles/introducing-casita-a-content-addressed-store-for-source-code-and-build-artifacts.md","example":false,"citation":"Domen Kožar, Casita. \"Introducing Casita: A content-addressed store for source code and build artifacts.\" 27 Sept 2026. https://casita.rs/blog/introducing-casita-a-content-addressed-store-for-source-code-and-build-artifacts/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://casita.rs/blog/introducing-casita-a-content-addressed-store-for-source-code-and-build-artifacts/"},"body_markdown":"### Cargo\n\n**libuv.rlib**\n\nWaiting\n\n**uv**\n\nWaiting\n\n**uv.d**\n\nWaiting\n\nWriting outputs\n\nWe’re rewriting Nix in Rust, and it needs to be split into layers and modernized.\n\nIts storage, build machinery, and higher-level tools can each be useful on their own.\n\nYou should be able to use one layer without adopting the whole stack.\n\nThat matters even more in agentic development. Agents produce more source code, more versions of it, and more build artifacts as they explore and test changes.\n\nKeeping every copy quickly becomes expensive, but throwing everything away means rebuilding or regenerating work you might need again.\n\nDevelopers are sharing screenshots of disks filled with `target/` directories in a matter of hours.\n\nIt feels familiar to how Nix users who have had to garbage collect\ntheir `/nix/store`: which artifacts are still useful, which ones can go, and how to reclaim space without losing what another project still needs.\n\nCasita is our first standalone layer, a content-addressed object store for source code and build artifacts, with shared storage, verification, synchronization, and garbage collection.\n\nIt is still pre-release and available as a Rust library and CLI. We’re targeting Linux, macOS, and Windows.\n\nRust workspaces and throwaway checkouts can accumulate `target/` directories.\nDeleting them discards artifacts a later build might reuse; keeping them\nduplicates bytes across similar projects. Cargo\nand uv cache downloaded\ndependencies, but their caches do not manage source versions and generated\noutputs across projects.\n\nWe added an `ArtifactStorage` interface\nso Cargo can prepare and persist registry archives, Git dependencies, and\nworkspace build outputs through different backends. The filesystem backend\npreserves Cargo’s usual behavior.\n\nThe Casita backend imports and restores that content through local IPC, while Cargo still decides what to download and build. This remains experimental: import and restore performance has not yet matched the filesystem backend. The development branch and Cargo guide have the details.\n\nThink of Casita’s storage model as a generalized Git object database. Git has blobs, trees, and commits. Casita stores immutable byte blobs and immutable object records: each format defines an object’s identity and its links to other objects. A directory links to its files and subdirectories; a Git commit links to a tree and its parents. Casita follows those links to find a complete saved version.\n\nEvery blob has a\nBLAKE3 hash of its\ncomplete bytes. BLAKE3 computes that hash as the root of a Merkle tree. Casita\ncan keep an optional Bao *outboard*\nwith the tree’s intermediate hashes, so a reader can verify one range against\nthe blob’s hash without reading the whole blob. A full sequential read checks\nthe complete hash. The storage backend may chunk and compress the bytes without\nchanging their address.\n\nAn object record gives those bytes meaning and links. For `src/main.rs`, a file\nrecord points to the blob containing its source code. The `src/` directory has\nits own record, which links to that file record and points to a blob encoding\nthe directory entries. These records form a graph above the blobs.\n\nFor this filesystem tree, the hashes connect roughly like this:\n\nChanging `main.rs` creates a new file ID, which changes the `src/` directory\nID and the IDs of its parent directories. Unchanged files keep their IDs and\nstored bytes. The old blobs and records are never rewritten.\n\nThe blob’s BLAKE3 hash and a source format’s hash serve different purposes. A Git commit keeps its native Git ID while Casita addresses its body bytes by their BLAKE3 hash. A Nix archive (NAR) has a SHA-256 hash of its canonical serialization. Casita measures that NAR hash, then stores the archive’s files as a graph of BLAKE3-addressed blobs. The verified object records let Casita traverse the graph without decoding every payload.\n\nRead Blob Storage and the repository model for the detailed contracts. The NAR IPC guide shows how to import and restore an archive.\n\nAn application gives a saved graph a name, called a\n*root*. The root points to one exact object and\nkeeps everything reachable from it. The objects and blobs stay immutable; the\napplication can move or remove the root as its needs change.\n\nApplications can save separate versions explicitly. For example, import a\nproject directory after two revisions under `projects/app/v1` and\n`projects/app/v2`. The imports leave the original working directory in place.\nBoth names keep their versions available, and identical files share one blob.\nAn application could also point `projects/app/current` at the same object as\n`v2`, then move that name to a later version without changing either saved\ngraph.\n\nCasita follows links from a root to find its complete graph for synchronization and retention. Removing a name makes objects needed only by that name eligible for garbage collection once active work releases them; files and chunks shared with another root remain.\n\nRoots are permanent by default, which suits saved Git histories and releases.\nRebuildable data, such as a Cargo `target/` directory, can instead use an\nevictable root:\n\nThe CLI can also change retention later with `root retention`.\nThe Rust API provides `set_root_with_retention` and\n`touch_root` for applications that manage their own cache roots. Marking a root\nevictable does not remove it immediately.\n\nImporters turn inputs into graphs that Casita can verify and retain. The filesystem importer walks a directory; the tar importer reads an archive without extracting it first; and the NAR importer measures a Nix archive’s canonical SHA-256 while storing its files as a graph. The Git importer keeps native Git object IDs and a view of selected branches and tags.\n\nEach importer uses the same repository publication and retention rules. Once content is saved under a root, Casita can synchronize it and collect it when no name or active work needs it.\n\nCasitar writes a complete saved graph to a portable\n`.casitar` archive. You can pass it through a file, pipe, or release artifact\nwhen the source repository is unavailable to the receiver. On import, Casita\nchecks every payload and object record, verifies that the archive contains the\nwhole graph, and then publishes the destination roots together. The archive\ncarries object identities and bytes, independent of the source repository’s\npacking and database layout.\n\nThe experimental Gix object database adapter reads and writes native Git objects through Casita. Git’s SHA-1 or SHA-256 IDs stay intact while Casita verifies and stores the object bodies and their links. The adapter covers object storage; a complete Git repository also needs its refs, index, and working tree integrated. The example writes a blob, tree, and commit, then reopens the store and reads the commit back.\n\nThe companion CasitaFS crate presents a saved filesystem tree as a read-only mount. Existing tools can browse its files without first checking out the whole tree. It uses FUSE on Linux and a native FSKit extension on macOS 26 or later. The macOS extension requires explicit setup for each user.\n\nSuppose a second repository already has `projects/app/v1`. Syncing\n`projects/app/v2` reuses what is there and sends missing content. Compatible\nstores can reuse chunks within changed files too. The destination checks\nincoming objects against their format’s rules and verifies that the whole\nsaved version arrived before it updates the name. An interrupted transfer can\nbe retried without exposing a partial version through that name.\n\nLocal repository sync is implemented in the CLI and Rust library. An optional SSH source uses OpenSSH for the connection while the receiving Casita repository still verifies what arrives. Sync adds content; removing destination names and collecting unused data are separate actions. See Synchronization for local, SSH, and selective workflows.\n\nIf both `projects/app/v1` and `projects/app/v2` are named, Casita keeps both.\nRemove the first name and run collection: bytes needed only by `v1` can go,\nwhile files and chunks shared with `v2` stay. Active readers and writers also\nhold on to the data they are using during collection.\n\nThe local CLI can preview a pass with `gc --dry-run` before running `gc`.\n\nAutomatic collection helps keep a busy disk from filling up. In the standard\nlocal repository, starting a mutation when the filesystem is at least 80% full\ntriggers a nonblocking collection attempt. Casita first reclaims data no root\nor active operation needs. If disk use remains at or above 75%, it releases\nthe least recently used roots explicitly marked evictable, vacuuming after\neach release until use falls below 75% or no eligible roots remain. Permanent\nroots stay, and manual `gc` preserves every named root, including evictable\nones.\n\nCollection applies to the Casita repository. See Garbage Collection for the retention and recovery rules.\n\nTwo runners can use the same S3 bucket and prefix to publish objects and read\nnamed versions. Their payload bytes are immutable, but names and object\nrecords change as new versions arrive. Casita records those changes in\nChroma’s **wal3**, a write-ahead log stored in S3. Conditional updates to its\nmanifest give competing writers an agreed order for their changes.\n\nReaders and writers register durable holds so collection preserves data still\nin use. The S3 profile is experimental and requires the `s3` feature; an\nabandoned hold needs explicit recovery. The shared S3 guide\nshows how independent owners can use one repository, and S3\nmaintenance covers collection and recovery.\n\nCasita runs from a source checkout today, but we have not tagged `v0.1.0`.\nBefore the first release, we need to improve performance where benchmarks show\nbottlenecks, broaden benchmark coverage, and use Casita in more real projects\nand end-to-end workflows. That practical use should expose problems we can fix\nbefore calling 0.1 ready.\n\nThe integrations have more work ahead. Cargo’s Casita backend needs faster import and restore before it can match the filesystem backend. The Git object store adapter still needs integration with the rest of a Git repository.\n\nFrom a Casita source checkout, install the CLI, then import a directory into the default repository, list its roots, and preview collection:\n\nWhen roots and object records are in one Casita repository and the matching blobs are in another, choose the blob source during sync:\n\nThe sync guide explains the requirements for a separate blob source.\n\nThe Quick Start walks through checkout and inspection, and the Library guide shows the supported Rust API.\n\nOur filesystem benchmark compares imports with Git add and commit. In that run, Casita imported the large-file corpus faster, while Git was faster for small-file imports and unchanged re-imports. The full benchmark reference includes methodology and separate native Git measurements.","body_html":"<h3 id=\"cargo\">Cargo</h3>\n<p><strong>libuv.rlib</strong></p>\n<p>Waiting</p>\n<p><strong>uv</strong></p>\n<p>Waiting</p>\n<p><strong>uv.d</strong></p>\n<p>Waiting</p>\n<p>Writing outputs</p>\n<p>We’re rewriting Nix in Rust, and it needs to be split into layers and modernized.</p>\n<p>Its storage, build machinery, and higher-level tools can each be useful on their own.</p>\n<p>You should be able to use one layer without adopting the whole stack.</p>\n<p>That matters even more in agentic development. Agents produce more source code, more versions of it, and more build artifacts as they explore and test changes.</p>\n<p>Keeping every copy quickly becomes expensive, but throwing everything away means rebuilding or regenerating work you might need again.</p>\n<p>Developers are sharing screenshots of disks filled with <code>target/</code> directories in a matter of hours.</p>\n<p>It feels familiar to how Nix users who have had to garbage collect\ntheir <code>/nix/store</code>: which artifacts are still useful, which ones can go, and how to reclaim space without losing what another project still needs.</p>\n<p>Casita is our first standalone layer, a content-addressed object store for source code and build artifacts, with shared storage, verification, synchronization, and garbage collection.</p>\n<p>It is still pre-release and available as a Rust library and CLI. We’re targeting Linux, macOS, and Windows.</p>\n<p>Rust workspaces and throwaway checkouts can accumulate <code>target/</code> directories.\nDeleting them discards artifacts a later build might reuse; keeping them\nduplicates bytes across similar projects. Cargo\nand uv cache downloaded\ndependencies, but their caches do not manage source versions and generated\noutputs across projects.</p>\n<p>We added an <code>ArtifactStorage</code> interface\nso Cargo can prepare and persist registry archives, Git dependencies, and\nworkspace build outputs through different backends. The filesystem backend\npreserves Cargo’s usual behavior.</p>\n<p>The Casita backend imports and restores that content through local IPC, while Cargo still decides what to download and build. This remains experimental: import and restore performance has not yet matched the filesystem backend. The development branch and Cargo guide have the details.</p>\n<p>Think of Casita’s storage model as a generalized Git object database. Git has blobs, trees, and commits. Casita stores immutable byte blobs and immutable object records: each format defines an object’s identity and its links to other objects. A directory links to its files and subdirectories; a Git commit links to a tree and its parents. Casita follows those links to find a complete saved version.</p>\n<p>Every blob has a\nBLAKE3 hash of its\ncomplete bytes. BLAKE3 computes that hash as the root of a Merkle tree. Casita\ncan keep an optional Bao <em>outboard</em>\nwith the tree’s intermediate hashes, so a reader can verify one range against\nthe blob’s hash without reading the whole blob. A full sequential read checks\nthe complete hash. The storage backend may chunk and compress the bytes without\nchanging their address.</p>\n<p>An object record gives those bytes meaning and links. For <code>src/main.rs</code>, a file\nrecord points to the blob containing its source code. The <code>src/</code> directory has\nits own record, which links to that file record and points to a blob encoding\nthe directory entries. These records form a graph above the blobs.</p>\n<p>For this filesystem tree, the hashes connect roughly like this:</p>\n<p>Changing <code>main.rs</code> creates a new file ID, which changes the <code>src/</code> directory\nID and the IDs of its parent directories. Unchanged files keep their IDs and\nstored bytes. The old blobs and records are never rewritten.</p>\n<p>The blob’s BLAKE3 hash and a source format’s hash serve different purposes. A Git commit keeps its native Git ID while Casita addresses its body bytes by their BLAKE3 hash. A Nix archive (NAR) has a SHA-256 hash of its canonical serialization. Casita measures that NAR hash, then stores the archive’s files as a graph of BLAKE3-addressed blobs. The verified object records let Casita traverse the graph without decoding every payload.</p>\n<p>Read Blob Storage and the repository model for the detailed contracts. The NAR IPC guide shows how to import and restore an archive.</p>\n<p>An application gives a saved graph a name, called a\n<em>root</em>. The root points to one exact object and\nkeeps everything reachable from it. The objects and blobs stay immutable; the\napplication can move or remove the root as its needs change.</p>\n<p>Applications can save separate versions explicitly. For example, import a\nproject directory after two revisions under <code>projects/app/v1</code> and\n<code>projects/app/v2</code>. The imports leave the original working directory in place.\nBoth names keep their versions available, and identical files share one blob.\nAn application could also point <code>projects/app/current</code> at the same object as\n<code>v2</code>, then move that name to a later version without changing either saved\ngraph.</p>\n<p>Casita follows links from a root to find its complete graph for synchronization and retention. Removing a name makes objects needed only by that name eligible for garbage collection once active work releases them; files and chunks shared with another root remain.</p>\n<p>Roots are permanent by default, which suits saved Git histories and releases.\nRebuildable data, such as a Cargo <code>target/</code> directory, can instead use an\nevictable root:</p>\n<p>The CLI can also change retention later with <code>root retention</code>.\nThe Rust API provides <code>set_root_with_retention</code> and\n<code>touch_root</code> for applications that manage their own cache roots. Marking a root\nevictable does not remove it immediately.</p>\n<p>Importers turn inputs into graphs that Casita can verify and retain. The filesystem importer walks a directory; the tar importer reads an archive without extracting it first; and the NAR importer measures a Nix archive’s canonical SHA-256 while storing its files as a graph. The Git importer keeps native Git object IDs and a view of selected branches and tags.</p>\n<p>Each importer uses the same repository publication and retention rules. Once content is saved under a root, Casita can synchronize it and collect it when no name or active work needs it.</p>\n<p>Casitar writes a complete saved graph to a portable\n<code>.casitar</code> archive. You can pass it through a file, pipe, or release artifact\nwhen the source repository is unavailable to the receiver. On import, Casita\nchecks every payload and object record, verifies that the archive contains the\nwhole graph, and then publishes the destination roots together. The archive\ncarries object identities and bytes, independent of the source repository’s\npacking and database layout.</p>\n<p>The experimental Gix object database adapter reads and writes native Git objects through Casita. Git’s SHA-1 or SHA-256 IDs stay intact while Casita verifies and stores the object bodies and their links. The adapter covers object storage; a complete Git repository also needs its refs, index, and working tree integrated. The example writes a blob, tree, and commit, then reopens the store and reads the commit back.</p>\n<p>The companion CasitaFS crate presents a saved filesystem tree as a read-only mount. Existing tools can browse its files without first checking out the whole tree. It uses FUSE on Linux and a native FSKit extension on macOS 26 or later. The macOS extension requires explicit setup for each user.</p>\n<p>Suppose a second repository already has <code>projects/app/v1</code>. Syncing\n<code>projects/app/v2</code> reuses what is there and sends missing content. Compatible\nstores can reuse chunks within changed files too. The destination checks\nincoming objects against their format’s rules and verifies that the whole\nsaved version arrived before it updates the name. An interrupted transfer can\nbe retried without exposing a partial version through that name.</p>\n<p>Local repository sync is implemented in the CLI and Rust library. An optional SSH source uses OpenSSH for the connection while the receiving Casita repository still verifies what arrives. Sync adds content; removing destination names and collecting unused data are separate actions. See Synchronization for local, SSH, and selective workflows.</p>\n<p>If both <code>projects/app/v1</code> and <code>projects/app/v2</code> are named, Casita keeps both.\nRemove the first name and run collection: bytes needed only by <code>v1</code> can go,\nwhile files and chunks shared with <code>v2</code> stay. Active readers and writers also\nhold on to the data they are using during collection.</p>\n<p>The local CLI can preview a pass with <code>gc --dry-run</code> before running <code>gc</code>.</p>\n<p>Automatic collection helps keep a busy disk from filling up. In the standard\nlocal repository, starting a mutation when the filesystem is at least 80% full\ntriggers a nonblocking collection attempt. Casita first reclaims data no root\nor active operation needs. If disk use remains at or above 75%, it releases\nthe least recently used roots explicitly marked evictable, vacuuming after\neach release until use falls below 75% or no eligible roots remain. Permanent\nroots stay, and manual <code>gc</code> preserves every named root, including evictable\nones.</p>\n<p>Collection applies to the Casita repository. See Garbage Collection for the retention and recovery rules.</p>\n<p>Two runners can use the same S3 bucket and prefix to publish objects and read\nnamed versions. Their payload bytes are immutable, but names and object\nrecords change as new versions arrive. Casita records those changes in\nChroma’s <strong>wal3</strong>, a write-ahead log stored in S3. Conditional updates to its\nmanifest give competing writers an agreed order for their changes.</p>\n<p>Readers and writers register durable holds so collection preserves data still\nin use. The S3 profile is experimental and requires the <code>s3</code> feature; an\nabandoned hold needs explicit recovery. The shared S3 guide\nshows how independent owners can use one repository, and S3\nmaintenance covers collection and recovery.</p>\n<p>Casita runs from a source checkout today, but we have not tagged <code>v0.1.0</code>.\nBefore the first release, we need to improve performance where benchmarks show\nbottlenecks, broaden benchmark coverage, and use Casita in more real projects\nand end-to-end workflows. That practical use should expose problems we can fix\nbefore calling 0.1 ready.</p>\n<p>The integrations have more work ahead. Cargo’s Casita backend needs faster import and restore before it can match the filesystem backend. The Git object store adapter still needs integration with the rest of a Git repository.</p>\n<p>From a Casita source checkout, install the CLI, then import a directory into the default repository, list its roots, and preview collection:</p>\n<p>When roots and object records are in one Casita repository and the matching blobs are in another, choose the blob source during sync:</p>\n<p>The sync guide explains the requirements for a separate blob source.</p>\n<p>The Quick Start walks through checkout and inspection, and the Library guide shows the supported Rust API.</p>\n<p>Our filesystem benchmark compares imports with Git add and commit. In that run, Casita imported the large-file corpus faster, while Git was faster for small-file imports and unchanged re-imports. The full benchmark reference includes methodology and separate native Git measurements.</p>","headings":[{"level":3,"text":"Cargo","id":"cargo"}]}}