Skip to content

Latest commit

 

History

History

cpp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

ReadMe.md

从C++编译WebAssembly的实用指南

Set the CMAKE Toolchain
export CMAKE_TOOLCHAIN_FILE=/home/user/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
Compile to WASM (default)
cd build  
emcmake cmake ../cpp -DJS_ONLY=OFF
make
Compile to JS
cd build  
emcmake cmake ../cpp -DJS_ONLY=ON  
make

参考资料