This last week I added bindings for go-libp2p (PRs #12 and #17), along with some tests using them. The functionality added allows initiating connections and handling arriving ones (multiplexing by their protocol ID).
The bindings are built by compiling the Go code with the cgo module, and then linking that with some C glue code into a dynamic library. thhe resulting binary is loaded by Erlang's runtime into an Elixir module. exposing the required functions.
The tests consist on creating two Host
s, installing a handler on one and initiating a connection on the second one. After that, some messages are sent and received from both sides.
With the implemented functionality, it would be possible to connect to other nodes and send messages, and to accept incoming connections and receive messages. We don't have any SSZ (de)serializing or Snappy (de)compression implemented yet, so that's something to work on, along with the functionality needed to get other nodes' addresses (discovery).
For the following week, I plan on adding discv5 support via the go-ethereum/p2p library, and after that add some examples connecting to other nodes and interpreting their responses (using SSZ & Snappy).