Skip to content

Commit e028197

Browse files
committed
Update README.md
1 parent 1996e35 commit e028197

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ experimental Ruby bindings for the HDF5 library
99
- [c2ffi](https://github.com/rpav/c2ffi)
1010
- [c2ffi4rb](https://github.com/kojix2/c2ffi4rb)
1111

12+
### Generate spec file
13+
14+
```sh
15+
c2ffi $(pkg-config --cflags-only-I hdf5 | ruby -npe '$_.strip!.gsub!(/-I/, "")<<"/hdf5.h"') > hdf5.json
16+
# c2ffi /usr/include/hdf5/serial/hdf5.h > hdf5.json
17+
```
18+
19+
### Generate Ruby bindings
20+
21+
```sh
22+
c2ffi4rb hdf5.json > lib/hdf5/ffi.rb
23+
```
24+
25+
The auto-generated bindings require some minor manual modifications, see the end of the ffi3.rb file.
26+
27+
### HDF5 1.10 or 1.14
28+
29+
Compatibility issues between versions of HDF5
30+
31+
Several functions in HDF5 are incompatible between 1.10 and 1.14 (the latest version at the time of writing). The current version of ruby-hdf5 is compliant with 1.10. This is because the latest version of the Ubuntu package is 1.10. However, 1.14 is already distributed with homebrew and 1.10 will be removed during 2025. It will need to be rewritten for 1.14 in the near future.
32+
1233
## License
1334

1435
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)