Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
anon4
11y ago
0 comments
Save
Share
Doesn't that make the answer "mostly yes, but you need to write the binding in C++"? I.e. write all your code in C, then just call the C methods from the one C++ class you must write.
0 comments
2 comments · 2 top-level
top
newest
oldest
nawitus
11y ago
You can write the library/addon in C and then define the bindings with JavaScript using various npm libraries. There's no need for C++.
Here's an example of such a wrapper over a C library:
https://github.com/panuhorsmalahti/mtp
angersock
11y ago
Eh, by that logic, we can write Node extensions in Fortran or Brainfuck.
j
/
k
navigate · click thread line to collapse