Meet Cheerp, an alternative to Emscripten
Cheerp is primarily used to port existing C/C++ libraries and applications to HTML5, but can also be used to write high-performance Web applications and WebAssembly components from zero.
For Windows you can download the latest version from the releases page and run the file
For Debian and Ubuntu just add the repository and install via APT:
- For macos you can also download the latest version from the releases page and run the file
To build from scratch just follow the instructions at this link.
Hello, World! would be:
Create a basic file in C++, for example, with the following code:
Compile with the command:
And run with Node.js:
You can also use your own
Remembering that some browsers won’t run on ~
file:///~, but you can use
python3 -m http.serverand then open the file.
For more information see the links: