See https://github.com/rust-lang/rust-bindgen Also, notice that https://github.com/rust-rocksdb/rust-rocksdb is already using `bindgen`, maybe we can rebase to it and add what we need.