Hi all,
I would really love to use hdf5 in my rust codebase but I’m a bit concerned.
the most used wrapper that I know of is this one: hdf5 - Rust but it is not getting updates (does not even work with the latest versions) and the maintainer is no longer active
even if the wrapper were to work it wouldn’t be possible to link it statically because the wrapper needs a system level hdf5 installation.
I was wondering if rust would ever be officially supported by the hdf5 group, maybe with its own codebase so that to use hdf5 would be as easy as adding a dependency in the Cargo.toml
I too am interested in this because I am thinking of switching to Rust, however your post lacks specificity is some areas. What is “most used wrapper”?
I’m not sure what you mean by ‘use it as a static lib’? Do you mean link hdf5 to your code statically instead of dynamically? If so, that’s not true in general. We’ve been linking HDF5 statically for years with C and Fortran. Are there different requirements for Rust? If you are building HDF5 from source you might need to add an option to generate static libraries.
Thanks for the quick response and for highlighting how to improve the post, I’ve made some minor changes in the post, hopefully it is faster to understand what I mean this way.
I also want to add that I know that it is possible to link hdf5 statically and I think it’s wonderful, but the most used wrapper in rust requires otherwise.
The most useful thing for me would be to deploy a rust crate that works out of the box without the need to download and install any package, sort of like the python one.
We don’t have any plans to officially support rust at present. The wrapper that Daniel linked seems to be much more active, so hopefully that works for your use case.
This wrapper is much more active but even this one is not really up to date, it doesn’t really work with the latest versions and I’m a bit scared that in the future even this fork could end up with lack of support.
Thank you for the support and for the responses.
That would be wonderful! Especially if this could enable developers to work with hdf5 without the need to install anything and all of this with the support of the community.
I think that in a system level language such as rust it would also make sense to have more low level control over the data itself, but it could always be added in the future if needed.
I hesitated to bring this up as I didn’t want to go off topic, but since you’re considering implementing multiple versions of HDFQL, I wondered if it might be worth exploring Wasmer.
I’m not an expert in this, but Wasmer allows the creation of universal packages that can run across different platforms. I know Rust can be used to produce such packages, and it should also be possible with C++.
Again, this is just a suggestion from someone without deep expertise, but it might offer an efficient and portable solution.