1. 11

  2. 1

    Are there any tools for automating C library -> Go bindings? This seems like something that shouldn’t need to be done manually every time. Obviously you’d need to settle for a limited level of abstraction in the translation.

    1. 1

      I don’t have a link handy, but the Go devs were talking about using machine translation for moving the Go compiler itself from C to Go. Possibly promising for what you want?

      1. 3

        They’ve been very careful to point out their automatic C translation is going to be just for the subset and style of C they use in the Go compiler. They don’t expect the tool to be broadly applicable.

      2. 1

        I think SWIG supports Go now?

        1. 2

          Yeah, I forgot about SWIG. shudder Maybe a request better left unsolved.

          I was thinking something along the lines of “Give it a C header file, get a template for a Go bindings library back.”