Emscripten provides various options for connecting “normal” JavaScript and compiled code, which range from functions to call compiled C/C++ from JavaScript (and vice versa) through to accessing environment variables from compiled code.
The topic Interacting with code provides an overview of all the methods. The other two topics provide additional detail on the Embind and WebIDL Binder tools.
备注
For information on how compiled code interacts with the browser environment, see Emscripten运行时环境. For file system-related manners, see the 文件系统概述.