https://github.com/ldeakin/zarrs_icechunk
icechunk store support for the zarrs Rust crate
https://github.com/ldeakin/zarrs_icechunk
icechunk library rust zarr zarr-v3 zarrs
Last synced: about 2 months ago
JSON representation
icechunk store support for the zarrs Rust crate
- Host: GitHub
- URL: https://github.com/ldeakin/zarrs_icechunk
- Owner: LDeakin
- License: apache-2.0
- Created: 2024-10-15T22:13:11.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-19T20:46:42.000Z (3 months ago)
- Last Synced: 2025-04-24T00:49:46.943Z (about 2 months ago)
- Topics: icechunk, library, rust, zarr, zarr-v3, zarrs
- Language: Rust
- Homepage: https://zarrs.dev
- Size: 40 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# zarrs_icechunk
[](https://crates.io/crates/zarrs_icechunk)
[](https://crates.io/crates/icechunk)
[](https://docs.rs/zarrs_icechunk)

[](https://github.com/LDeakin/zarrs_icechunk/actions/workflows/ci.yml)[`icechunk`](https://crates.io/crates/icechunk) store support for the [`zarrs`](https://crates.io/crates/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`](https://www.unidata.ucar.edu/software/netcdf/), [`HDF5`](https://www.hdfgroup.org/solutions/hdf5/), etc.) that are converted to `icechunk`-backed "virtual Zarr datacubes" via [`VirtualiZarr`](https://github.com/zarr-developers/VirtualiZarr).
```rust
use icechunk::{Repository, RepositoryConfig, repository::VersionInfo};
use zarrs_icechunk::AsyncIcechunkStore;// Create an icechunk repository
let storage = icechunk::new_in_memory_storage().await?;
let config = RepositoryConfig::default();
let repo = Repository::create(Some(config), storage, HashMap::new()).await?;// Do some array/metadata manipulation with zarrs, then commit a snapshot
let session = repo.writable_session("main").await?;
let store = Arc::new(AsyncIcechunkStore::new(session));
let array: Array = ...;
let snapshot0 = store.session().write().await.commit("Initial commit", None).await?;// Do some more array/metadata manipulation, then commit another snapshot
let session = repo.writable_session("main").await?;
let store = Arc::new(AsyncIcechunkStore::new(session));
let array: Array = ...;
let snapshot1 = store.session().write().await.commit("Update data", None).await?;// Checkout the first snapshot
let session = repo.readonly_session(&VersionInfo::SnapshotId(snapshot0)).await?;
let store = Arc::new(AsyncIcechunkStore::new(session));
let array: Array = ...;
```## Version Compatibility Matrix
See [doc/version_compatibility_matrix.md](./doc/version_compatibility_matrix.md).## Licence
`zarrs_icechunk` is licensed under either of
- the Apache License, Version 2.0 [LICENSE-APACHE](./LICENCE-APACHE) or or
- the MIT license [LICENSE-MIT](./LICENCE-MIT) or , 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.