Interacting with code Emscripten provides numerous methods to connect and interact between JavaScript and compiled C or C++: Call compiled C functions from normal JavaScript: Using ccall or cwrap. Using direct function calls (faster but more complicated). Call compiled C++ classes from JavaScript using bindings created with: Embind or WebIDL-Binder Call JavaScript functions from C/C++: Using emsc