Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Anil8753/CmakeEmscripten
Starter to build Web Assembly from C++ sources using CMake and Emscripten
https://github.com/Anil8753/CmakeEmscripten
emscripten wasm web-assembly
Last synced: 4 months ago
JSON representation
Starter to build Web Assembly from C++ sources using CMake and Emscripten
- Host: GitHub
- URL: https://github.com/Anil8753/CmakeEmscripten
- Owner: Anil8753
- License: mit
- Created: 2019-12-28T16:43:49.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-31T20:17:30.000Z (about 5 years ago)
- Last Synced: 2024-07-30T21:02:29.509Z (6 months ago)
- Topics: emscripten, wasm, web-assembly
- Language: JavaScript
- Size: 159 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a starter project to build the C++ source to Web Assembly (WASM) with the Emscripten tool chain.
Actually we can build C++ files to WASM with Emscripten only.emcc -o build\main.js file1.cpp file2.cpp
But managing the large project will be difficult. For a large project CMake build system helps a lot. This starter project uses the emscripten on top of the CMake project. It also allows us to build existing CMake projects with much changes.
Details: https://emscripten.org/docs/compiling/Building-Projects.html
Setup environment
1. open bash
2. go to emsdk directorty and followings run command
./emsdk activate latest
source ./emsdk_env.shBuild setup
3. create directory 'cmake_test'
mkdir build
cd build4. clear dirctory if needed
go to build directory and run
rm -rf *5. configure cmake
emconfigure cmake ..6. build the source to wasm
emmake make