What does HackerNews think of cbindgen?
A project for generating C bindings from Rust code
Using D code in Rust probably will be much more painful and I am not sure if it can be done 100% safely...
There's the Rust repository, and the auto-generated documentation can be found at https://docs.rs/libp2p/0.11.0/libp2p/
I'm curious what about a C implementation is the requirement for you? Is it the ability for to link against your C/C++ code, or for reading and understanding the structures and algorithms with the simplicity of C parlance, or another reason?
If the first one, it is possible to create a C shared-library "cdylib" with Rust (included in cargo by default), and using cbindgen[1] you can generate the headers to use the c-api.
It doesn't look like anybody has done that yet, unfortunately. But know that it should be a lot easier to create C/C++ compatibility than doing a rewrite or port.
[1] https://github.com/eqrion/cbindgen
EDIT:
Or as the sibling comment points out, there ARE C implementations out there, so you can ignore this post.
On the flip side, calling C code in rust is pretty easy - you have the entire libc available, and rust-bindgen[1] generate bindings for you, which in my experience works very well. So, you may also consider writing your program in rust… If that's possible.
[0]: https://github.com/eqrion/cbindgen
[1]: https://github.com/rust-lang/rust-bindgen