I want to implement a sudo plugin in Rust. The plugin should implement a C API that specified in man 5 sudo_plugin. It defines some data structures and function signiature.
Is it possible to implement a shared library in Rust that compatible with C API that defined in given header files of sudo plugin?
Yes! I haven't done so myself, so others would be better able to answer specific questions. But the Rustonomicon entry on FFI will probably have a lot of useful info for you.