Go bindings to the HDF5 library
Go Makefile
Latest commit dbf32d9 May 4, 2016 @simleb simleb Fix string attributes broken by new cgo rules
Strings are unique as they are the only datatype whose concrete type is a
pointer (`char*`). This becomes a problem in Go 1.6 when trying to feed
`H5Awrite` a pointer to the backing array of the original string as it becomes
a pointer to a Go pointer and this [provokes a panic][1].

This commit fixes the problem at the expense of copying the strings. Hopefully
this is not as big a problem for attributes since they tend to be small
compared to datasets.

[1]: https://golang.org/doc/go1.6#cgo



Build Status GoDoc

Naive cgo bindings for the C-API of hdf5.





  • Only version 1.8.x of HDF5 is supported.
  • In order to use HDF5 functions in more than one goroutine simultaneously, you must build the HDF5 library with threading support. Many binary distributions (RHEL/centos/Fedora packages, etc.) do not have this enabled. Therefore, you must build HDF5 yourself on these systems.

Known problems

  • the h5pt packet table interface is broken.
  • support for structs with slices and strings as fields is broken