
Understanding IPFS in Depth(5/6): What Is Libp2p? - vasa_develop
https://medium.com/@vaibhavsaini_67863/understanding-ipfs-in-depth-5-6-what-is-libp2p-f8bf7724d452
======
koalalorenzo
Thanks for sharing! I hope this will help new people understanding IPFS all
its components

~~~
vasa_develop
Thanks koalalorenzo!

------
shrutigarg12
Really great article, forsomeone who is new to Ipfs.

~~~
vasa_develop
Thanks, shrutigarg12

------
dingo_bat
I read the whole piece and wanted to look at the interfaces of the library but
couldn't find a C implementation. I don't know where to look for the interface
in rust or go. I think the most basic requirement for a networking library is
a working C/C++ implementation.

~~~
akubera
[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.

