Installation
Prerequisites
The most recent zarrs
requires Rust version or newer.
You can check your current Rust version by running:
rustc --version
If you don’t have Rust installed, follow the official Rust installation guide.
Some optional zarrs
codecs require:
These are typically available through package managers on Linux, Homebrew on Mac, etc.
Adding zarrs
to Your Rust Library/Application
zarrs
is a Rust library.
To use it as a dependency in your Rust project, add it to your Cargo.toml
file:
[dependencies]
zarrs = "18.0" # Replace with the latest version
The latest version is .
See crates.io for a full list of versions.
To use the latest development release:
[dependencies]
zarrs = { git = "https://github.com/LDeakin/zarrs.git" }
The Cargo reference has more information on git
repository dependencies.
Crate Features
zarrs
has a number of features for stores, codecs, or APIs, many of which are enabled by default.
The below example demonstrates how to disable default features and explicitly enable required features:
[dependencies.zarrs]
version = "18.0"
default-features = false
features = ["filesystem", "blosc"]
See zarrs (docs.rs) - Crate Features for an up-to-date list of all available features.
zarrs
Crates
Some zarrs
functionality (e.g. additional stores, bindings, etc.) are in separate crates.
graph LR subgraph Core zarrs_metadata[zarrs_metadata <br> zarrs::metadata] --> zarrs zarrs_storage[zarrs_storage <br> zarrs::storage] --> zarrs end subgraph Stores direction LR zarrs_filesystem[zarrs_filesystem <br> zarrs::filesystem] zarrs_object_store zarrs_opendal zarrs_http zarrs_icechunk zarrs_zip end Stores --> zarrs_storage subgraph Bindings direction LR zarrs_ffi zarrs-python end zarrs --> Bindings subgraph CLI Tools zarrs --> zarrs_tools end subgraph metadata_conventions[Zarr Metadata Conventions] ome_zarr_metadata --> zarrs_tools end
Core Crates
zarrs

The core library for manipulating Zarr hierarchies.
zarrs_metadata

Provides Zarr V2 and V3 metadata serialisation and deserialisation.
If you are just interested in manipulating Zarr
metadata, this crate may be relevant.
note
This crate is re-exported in zarrs
as zarrs::metadata
.
zarrs_storage

The storage API for zarrs
.
Custom store implementations only need to depend on zarrs_storage
.
note
This crate is re-exported in zarrs
as zarrs::storage
.
Store Crates
The Stores chapter details the various types of stores and their associated crates.
Bindings
zarrs_ffi

A subset of zarrs
exposed as a C/C++ API.
This crate is detailed in the C/C++ Bindings chapter.
zarrs-python

A CodecPipeline
for the zarr
Python reference implementation that uses zarrs
.
This crate is detailed in the Python Bindings chapter.
CLI Tools
zarrs_tools

Various tools for creating and manipulating Zarr v3 data with the zarrs
rust crate.
This crate is detailed in the zarrs_tools chapter.
Zarr Metadata Conventions
ome_zarr_metadata

A Rust library for OME-Zarr (previously OME-NGFF) metadata.
OME-Zarr, formerly known as OME-NGFF (Open Microscopy Environment Next Generation File Format), is a specification designed to support modern scientific imaging needs. It is widely used in microscopy, bioimaging, and other scientific fields requiring high-dimensional data management, visualisation, and analysis.