previous article:Virtual Interpreter Component Design
As illustrated in the diagram below, the '.c' file contains the core logic and corresponding components of the virtual interpreter. We utilize the Emscripten compiler to compile the target C file into a WebAssembly (WASM) module. This compiler, based on LLVM, initially compiles C/C++ source code into abstract LLVM bytecode. Subsequently, using the Emscripten backend compiler, this abstract bytecode is transformed into asm.js format files. Finally, employing the 'WASM=1' flag, it can be further encoded into WebAssembly binary files with the '.wasm' extension.