C + Rust
The heavy lifting of this WAF will be done by the libinjection project. It’s well maintained and covers a lot of cases we won’t be able to ship as MVP if written from the ground up.
The only issue is it's written entirely in C, so an interface layer between Rust and C will be required. Using the bindgen library we can generate Rust FFI code that will call C functions.
Without bindgen we would have to manage the FFI bindings for each supported platform. Using bindgen also came with a truckload of issues addressed in a later section.
The FFI bindings generated by bindgen will live inside the build folder. VSCode is even nice enough to provide full e2e IntelliSense (assuming the rust-lang.rust-analyzer
extension is installed).
Now we can start writing Rust code referring to native C code.
Last updated