How to approach a new implementation?

I’ve spent a couple days acquainting myself with the Go/C cross-language functionality. I believe that wrapping the Go implementation in C is workable, and a good way to get to an Ocaml solution (at least a first step). If that’s the case, having a good definition of the C ‘signature’ is important. Is there someplace to discuss this? A good first module to try this approach? Should I just jump in on Github?

I’ve been surfing around the libp2p information from the standpoint of perhaps making an Ocaml ‘version’. My main question is - how should I approach this? Plus, here’s a few comments/questions (with the caveat that being wrong is one of the things I do best):

  1. after surfing the specs, it’s not clear that there is enough there to really code to the spec’s. I was expecting something on the line of a sequence diagram or two;
  2. I was naively thinking that there would be a ‘base’ implementation that one could wrap in a language such as Ocaml to get started - maybe something in C or C++ for example. Wouldn’t that jump start a lot of integration?
  3. how are you approaching the problem of various implementations functioning identically?

This looks like a great environment and I’m looking forward to getting familiar with it.

I just found this:


which nicely defines the way to get between Go and C. Perhaps this is a way forward (I know how to get between C and Ocaml).