The following answer is deprecated but still useful for understanding Node.js from the first release
Node.js is now also available for Windows at nodejs.org. No cygwin requirement anyway.
First of all, at the moment there is no native Windows Node.js port, there is only a version of cygwin (but I suspect that you already knew this).
There was a node module floating somewhere in GitHubs that provided a wrapper for invoking native libraries, but an iirc that only worked with .so
libs.
Therefore, if you want to use the C # DLL, you will first need to write your own Node.js extension as an interface:
https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/
From this extension, you have to load the DLL and transfer the calls from Node.js to C # code, this means that you need to write low-level C / C ++ code and convert C # values ββto V8 material.
I only have experience with C ++ and V8, it is a little difficult to start, as the code examples are a bit sparse, as well as C ++ classes that are not trivial. But I wrote a small JS game engine of a kind that uses the C ++ OpenGL backend, it is incomplete (and there are almost no comments), but this may give you some ideas.
Note. There are several projects in the wild that provide somewhat automatic wrapping for V8, but this is only C ++.
So in conclusion, I think it will be quite adventurous to get C # wrappers to work, but it should be possible.
Ivo Wetzel Jan 11 2018-11-11T00: 00Z
source share