I'm trying to build a javascript app and i need to use a c++ library. Is there any way to include a c++ library in a javascript application?
Asked
Active
Viewed 635 times
2
-
1Maybe write bindings for it? However that requires some work – Jonas Wilms Jan 14 '18 at 21:26
2 Answers
4
Yes. You can utilize emscripten to convert C++ to JavaScript. You can alternatively
use Native Messaging to communicate with a shell script
use a local server to
POST
commands to a shell script which runs the native shell script, e.g., seeshell_exec()
calls at PHP at How to programmatically send a unix socket command to a system server autospawned by browser or convert JavaScript to C++ souce code for Chromium?

guest271314
- 1
- 15
- 104
- 177
-
In addition to these options, Node.js supports [native addons](https://nodejs.org/api/addons.html) in C++. – Anderson Green Mar 05 '23 at 00:59