Accessing JavaScript's functionality from C/C++ code allows for added flexibility when working with WebAssembly. The methodologies and means of utilizing JavaScript differ considerably between Emscripten's glue code and Wasm-only implementations. In this section, we will cover the various ways you can integrate JavaScript into your C/C++ code with and without Emscripten.
Calling JavaScript functions from C/C++
Interacting with JavaScript using glue code
Emscripten provides several techniques for integrating JavaScript with your C/C++ code. The techniques available differ in implementation and complexity, and some only apply to specific execution environments (for example, the browser). Deciding which one to use is...