Request feedback: Use Rust native components converted from c-to-rust as an alternative to external "C" binding
We’re exploring the development of a crate that would provide alternatives to the extern "C" APIs for git2-rs, keeping API compatibility and behavior equivalent. The motivation is that some bugs or unsafe assumptions in C libraries can propagate through the FFI boundary, even if Rust wrappers are careful. We know rewriting mature C libraries is a big effort, so our idea is to provide optional Rust native code that replaces the C library for the selected ABI. We plan to maintain it actively and collaborate with the community, the crate would be fully maintained and actively developed by external contributors, without replacing the original library. We’d like to understand the community’s stance: would maintainers and users be open to such a Rust-native crate existing and being maintained alongside the current project?
The bindings to a C library are the wrong place to ask this question. If you want to build a pure Rust translation of a popular C library, I wish you the best of luck doing so, but don't start with the bindings. Write a compatible Rust implementation of the library (not AI, please), make it pass all the tests, make it popular in the ecosystem, and then ask whether the bindings should offer it as a new backend. See zlib-rs and its path into flate2 for a good example of how to do this.