This project showcases how to crate a wrapper of a C library in Rust.
An example C library is present in libhello. Its Rust bindings and safe wrappers all live in src. The build system (build.rs) first builds the C library statically, then it generates Rust types and functions from C using bindgen and finally it builds the wrapper library.
Example program src/main.rs:
$ cargo run
[C] Hello! I put some values in the struct
[Rust] HelloStruct: HelloStruct { x: 7, y: 'b', message: "HELLO" }
- Author: Giovanni Santini
- Mail: giovanni.santini@proton.me
- License: MIT