4 ms·
https://github.com/libp2p/rust-libp2p https://github.com/libp2p/rust-libp2p There's the Rust repository, and the auto-generated documentation can be found at h
by akubera 7y ago
https://github.com/libp2p/rust-libp2p https://github.com/libp2p/rust-libp2p
There's the Rust repository, and the auto-generated documentation can be found at https://docs.rs/libp2p/0.11.0/libp2p/ 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 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.