zarrs_icechunk
icechunk store support for the zarrs Rust crate.
Icechunk is a transactional store that enables git-like version control of Zarr hierarchies.
zarrs_icechunk can read data in a range of archival formats (e.g., netCDF4, HDF5, etc.) that are converted to icechunk-backed "virtual Zarr datacubes" via VirtualiZarr (example below).
Version Compatibility Matrix
See doc/version_compatibility_matrix.md.
Examples
Basic Usage and Version Control
use ;
use AsyncIcechunkStore;
// Create an icechunk repository
let storage = new_in_memory_storage.await?;
let config = default;
let repo = create.await?;
// Do some array/metadata manipulation with zarrs, then commit a snapshot
let session = repo.writable_session.await?;
let store = new;
let array: = ...;
let snapshot0 = store.session.write.await.commit.await?;
// Do some more array/metadata manipulation, then commit another snapshot
let session = repo.writable_session.await?;
let store = new;
let array: = ...;
let snapshot1 = store.session.write.await.commit.await?;
// Checkout the first snapshot
let session = repo.readonly_session.await?;
let store = new;
let array: = ...;
Virtualise NetCDF as Zarr (via VirtualiZarr)
Decode a virtual Zarr array /examples/data/test.icechunk.zarr:
This references /examples/data/test[0,1].nc hosted in this repository over HTTP.
/examples/data/test.icechunk.zarr was created with /examples/virtualizarr_netcdf.py.
Licence
zarrs_icechunk is licensed under either of
- the Apache License, Version 2.0 LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0 or
- the MIT license LICENSE-MIT or http://opensource.org/licenses/MIT, at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.