Skip to content

Example for a parallelized C++ WebAssembly app with threadpool and Shellfish UI

License

Notifications You must be signed in to change notification settings

pycage/mandelbrot-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an example project of how to use threads in C++ with WebAssembly and how to communicate between the C++ and JavaScript worlds with Embind.

Screenshot

See it in action.

Setup

mandelbrot-wasm # mkdir build
mandelbrot-wasm # cd build
build # emcmake cmake ..
build # make
build # emrun --port 8000 --no_browser .

Important note to mobile users:

Unfortunately. mobile browsers currently do not support running multi-threaded WebAssembly. Sorry!

Important note to Chrome/Chromium users:

Chrome/Chromium 68 or higher is required.

https://www.chromium.org/Home/chromium-security/ssca

Important note to Edge users:

Edge 79 or higher is required.

https://blogs.windows.com/msedgedev/2018/01/03/speculative-execution-mitigations-microsoft-edge-internet-explorer/

Important note to Firefox users:

TL;DR: It won't run in Firefox right now. Mozilla is working to fix it (since 2018...).

Due to several security enforcements, Firefox is currently (Firefox 77) still unable to run multi-threaded WebAssembly.

About

Example for a parallelized C++ WebAssembly app with threadpool and Shellfish UI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published