This is a sample project showing how you might integrate Rust into a C program, and the steps towards converting a C API into Rust, of course while keeping the C bindings in place.
It requires bindgen; install it with cargo install bindgen
, and
remember to add $HOME/.cargo/bin to your path.