Using capnp with nodejs on windows

91 views
Skip to first unread message

Diggory Blake

unread,
Feb 1, 2015, 10:51:28 PM2/1/15
to capn...@googlegroups.com
After several attempts, I've come to the conclusion that it's impossible to use the nodejs bindings for capnp on windows:
- node-gyp does not support building modules with mingw
- capnp only supports lite mode when building with msvc
- nodejs bindings require dynamic, which is not supported in lite mode

Is there something I haven't thought of? If not, what exactly is necessary to get this to work?

Kenton Varda

unread,
Feb 2, 2015, 6:34:20 PM2/2/15
to Diggory Blake, capnproto
Hi Diggory,

I'm afraid you're probably right.

Even if node-gyp supported it, a node module compiled with MinGW would be unlikely to work with a node compiled with MSVC, due to C++ ABI incompatibilities. And unfortunately, node-capnp depends on *all* of Cap'n Proto's code, including the schema parser and RPC systems, so it likely won't compile on MSVC for some time.

Of course, the pure-Javascript implementations of Cap'n Proto should work on Node on Windows, if you don't need RPC.

-Kenton

--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
Visit this group at http://groups.google.com/group/capnproto.

maur...@parkside.at

unread,
Jan 9, 2020, 11:30:38 AM1/9/20
to Cap'n Proto
Hi,
is there any news about using capnp with nodejs on windows?
To unsubscribe from this group and stop receiving emails from it, send an email to capn...@googlegroups.com.

Kenton Varda

unread,
Jan 9, 2020, 7:20:13 PM1/9/20
to maur...@parkside.at, Cap'n Proto
Hi!

Well, good news and bad news.

The good news is that the whole Cap'n Proto core library has worked on Windows for a few years now.

The bad news is that I don't think anyone has tried making node-capnp work on Windows.

In theory, porting the serialization code should be pretty easy. The RPC layer, though, depends on some integration with libuv that likely needs significant modification to work on WIndows. If you only need serialization, you could perhaps #ifdef that all out, though.

-Kenton

To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/b81ad830-337b-49cc-86c0-9bafdf26b7a4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages