7 releases

0.6.4 Aug 8, 2023
0.6.3 Jun 17, 2023
0.6.2 Feb 24, 2023
0.6.0 Jan 31, 2023
0.5.0 Jun 16, 2022

#432 in Filesystem

Download history 1277/week @ 2023-11-04 1376/week @ 2023-11-11 1412/week @ 2023-11-18 1164/week @ 2023-11-25 1279/week @ 2023-12-02 1293/week @ 2023-12-09 1499/week @ 2023-12-16 868/week @ 2023-12-23 717/week @ 2023-12-30 902/week @ 2024-01-06 970/week @ 2024-01-13 1132/week @ 2024-01-20 1576/week @ 2024-01-27 1456/week @ 2024-02-03 770/week @ 2024-02-10 1355/week @ 2024-02-17

5,410 downloads per month
Used in 6 crates (4 directly)

Apache-2.0 OR BSD-3-Clause

22K SLoC


The core storage subsystem for Nydus Image Service to:

  • Fetch blob objects from storage backend such as Registry, OSS, S3, local disk and file systems etc.
  • Load data from storage backend on demand.
  • Cache blob objects on local storage.



  • x86_64
  • aarch64

Operating Systems:

  • Linux
  • MacOS


This code is licensed under Apache-2.0 or BSD-3-Clause.


Chunked blob storage service to support Rafs filesystem.

The Rafs filesystem is blob based filesystem with chunk deduplication. A Rafs filesystem is composed up of a metadata blob and zero or more data blobs. A blob is just a plain object storage containing data chunks. Data chunks may be compressed, encrypted and deduplicated by content digest value. When Rafs file is used for container images, Rafs metadata blob contains all filesystem metadatas, such as directory, file name, permission etc. Actually file contents are split into chunks and stored into data blobs. Rafs may built one data blob for each container image layer or build a single data blob for the whole image, according to building options.

The nydus-storage crate is used to manage and access chunked blobs for Rafs filesystem, which contains three layers:

  • Backend: access raw blob objects on remote storage backends.
  • Cache: cache remote blob contents onto local storage in forms optimized for performance.
  • Device: public APIs for chunked blobs

There are several core abstractions provided by the public APIs:

  • BlobInfo: provides information about blobs, which is typically constructed from the blob array in Rafs filesystem metadata.
  • BlobDevice: provides access to all blobs of a Rafs filesystem, which is constructed from an array of BlobInfo objects.
  • BlobChunkInfo: provides information about a data chunk, which is loaded from Rafs metadata.
  • BlobIoDesc: a blob IO descriptor, containing information for a continuous IO range within a chunk.
  • BlobIoVec: a scatter/gather list for blob IO operation, containing one or more blob IO descriptors

To read data from the Rafs filesystem, the Rafs filesystem driver will prepare a BlobIoVec object and submit it to the corresponding BlobDevice object to actually execute the IO operations.


~575K SLoC