A utility to help convert C structs to Rust structs for integration over FFI.
As part of my project MediaOrgan.com, I interface with RAW-processing library LibRaw, a C library that uses massive amounts of structs with many fields. The aim of the utility is to remove most of the manual labor of converting such structs to Rust format.
My primary source of information about C to Rust structs comes from this article
FFI in Rust - writing bindings for libcpuid
This program revealed some bugs in Rusts compiler, so it may need Rust 1.3 nightly to build.
(for instance: target/release/cstruct2rs.exe example/libraw_types.h example/libraw_types.rs )
First-commit status. Have not tried to actually use the generated output for anything yet, so it is probably all wrong.
The example folder holds an input example file from LibRaw and the generated output from cstruct2rs. Obvious issues are: