Is there a way to call a c++ library from javascript code inside both a browser and node.js? Ideally, the code to invoke a function call in the library is the same for both cases. It's acceptable if the approach only supports Chrome for a browser. I've found approaches that support either the browser or node.js, but not both. Thanks.
Edit: To clarify, I have a pure javascript codebase that runs both server-side (node) and client-side (browser) and I want the c++ library to be callable from this codebase for both cases.