Now we are using more functionality given to us by rust-bindgen instead of maintaining enum mappings ourselves:
* Rustified enums can be generated automatically by using the EnumVariation::Rust style in rust-bindgen
* Redundant suffixes can be removed through implementing ParseCallbacks::enum_variant_name
* The redundant FromRust trait was removed and replaced with the standard From and Into traits
Note that all of the enum definitions changed (again?), and now they are
flattened into the 'bindings' namespace. This breaks the API in a way that
is relatively easy to fix, albeit annoying. Attempts to change the enum
generation using default_enum_style() resulted in endless compiler errors.
cargo test passes
Using the changes from @gadomski along with some additional work, to get the
generated bindings working again. Works on macOS and FreeBSD 11. A couple of
hacks are needed for FreeBSD, but nothing too serious.
Changed to use the libc prefix, and changed to use the generated enums.
Fixes#22, #15, and #14
cargo test passes
Rather than cloning the bindgen repository and building from source, use
the packaged crate. The result is the rebuilds are much, much faster.
Also, had to make numerous changes for the new version of bindgen.
cargo test passes