Go extensions for other languages

591 views
Skip to first unread message

Justin Israel

unread,
Jan 2, 2014, 9:20:56 PM1/2/14
to golang-nuts
A friend of mine had suggested that it was possible to write Node.js native extensions in Go as opposed to C++. I said that I wasn't aware that was possible, and he said as far as he knew, it was. So I tried to find information on it which turned up this post:


I was wondering if someone could explain the potential usability/limitations of the approach in this example, in terms of "writing extensions for other languages". I was under the impression that Go needed to be the entry point, for its initialization, yet this seems to just start the entry point from a C wrapper?

Anyways, interested to hear some information on this approach.

Kyle Lemons

unread,
Jan 3, 2014, 2:22:25 PM1/3/14
to Justin Israel, golang-nuts
It might be doable for simple things like add (that don't generate garbage or require the runtime), but it's not supported (yet) by either compiler as far as I know.  Part of the work is done for linux (see golang.org/issue/256), but there are a number of open questions (what happens when you load two shared objects? etc)


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Justin Israel

unread,
Jan 3, 2014, 3:37:50 PM1/3/14
to Kyle Lemons, golang-nuts
That's what I figured. I also assumed that it had to be limited in some fashion. Thanks for the clarification!
Reply all
Reply to author
Forward
0 new messages