Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Rational way to interface zarr with Rust #201

Closed
KestutisMa opened this issue Feb 12, 2022 · 3 comments
Closed

[question] Rational way to interface zarr with Rust #201

KestutisMa opened this issue Feb 12, 2022 · 3 comments

Comments

@KestutisMa
Copy link

KestutisMa commented Feb 12, 2022

It's not real a z5py issue, but I think still interesting, as Rust probably could be useful in research (https://www.nature.com/articles/d41586-020-03382-2).

What could be good way to interface zarr with project in Rust?

  • Maybe write small custom wrapper of z5 c++ using rust c ffi?
  • Or use z5py with pyo3.rs?

Native rust zarr implementation seems unmaintained for 2 years https://github.com/sci-rs/zarr.
Also, seems there were discussions, but last post was about a year ago and no working implementation yet.

@clbarnes
Copy link
Contributor

clbarnes commented Feb 12, 2022

The rust N5 implementation is in production use and would certainly serve as a good base. As discussed in that issue, there are possibly design changes which could minimise allocations, but they haven't been forthcoming. Deep optimisation at that level seemed premature when these formats are designed to suppose very heavy IO which would drastically outweigh any marginal gains on path-handling end.

We were resistant to putting significant effort into a rust implementation of zarr v2 when zarr v3 is "around the corner", but there hasn't been a lot of progress on that front in the last couple of years either.

A proposal rust implementation, potentially based off rust-n5, would certainly be welcome.

@constantinpape
Copy link
Owner

rust-n5 is certainly the way to go, and afaik it also supports zarr as a file format.

zarr v3 is "around the corner", but there hasn't been a lot of progress on that front in the last couple of years either.

There actually has been some momentum recently towards finalizing zarr v3 and there are first implementations in python and c++ already; see recent issues in https://github.com/zarr-developers/zarr-specs/issues

@KestutisMa
Copy link
Author

Thank you! Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants