Skip to content

Examples showing how to use Web Assembly with your C++ applications

Notifications You must be signed in to change notification settings

airloaf/Emscripten-CPP-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emscripten CPP Examples

Examples showing how you can use C++, CMake and Emscripten to make both web and native applications.

Dependencies

Building/Compiling

The following build instructions are tailored towards Linux systems.

Note: Make sure you have installed the Emscripten SDK and you have your terminal environment setup for using the SDK commands.

# Create build scripts with CMake
emcmake cmake .

# Compile the code to Web Assembly (WASM)
emmake make

All the WASM binaries should be located in the bin folder. Now to run these WASM binaries, you will need to host the HTML files on a development server and contact the server through your web browser. I recommend using the Live Server plugin for VSCode, although anything that can host your HTML should work.

References

About

Examples showing how to use Web Assembly with your C++ applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published