Update emsdk version used in testing (#27325) This is an automatic change generated by tools/maint/rebaseline_tests.py --bump-emsdk. emsdk version updated: 99219dd9dec7558e4c8640b568ee54aebd409da1 => 48c730101db0c5c74a0a1042ed21631370db9c86 This includes the following revisions: ``` - 48c73010 Roll llvm-project from 3a6048dbea15 to 2aab89554cbf (8 revisions) - 45714672 Roll llvm-project from d6d0ccce19d1 to 3a6048dbea15 (3 revisions) - b7ada761 Roll v8 from 0646faaada71 to 81b069e2bf3a (1 revision) - 58e9c910 Roll llvm-project from 670e0a0c147a to d6d0ccce19d1 (10 revisions) - 09875eb8 Roll llvm-project from e490b437555b to 670e0a0c147a (5 revisions) - f0684759 Roll emscripten from 3af4cdc1234c to bd5b72d3f72d (1 revision) - a091b69d Roll llvm-project from e2223e665ecc to e490b437555b (12 revisions) - cf339f1c Roll llvm-project from a83ec0fb845e to e2223e665ecc (6 revisions) ``` Full log: https://chromium.googlesource.com/emscripten-releases/+log/99219dd9dec7558e4c8640b568ee54aebd409da1..48c730101db0c5c74a0a1042ed21631370db9c86 Co-authored-by: emscripten-bot <emscripten-bot@users.noreply.github.com>
Main project page: https://emscripten.org
Chromium builder status: emscripten-releases
Emscripten compiles C and C++ to WebAssembly using LLVM and Binaryen. Emscripten output can run on the Web, in Node.js, and in wasm runtimes.
Emscripten provides Web support for popular portable APIs such as OpenGL and SDL2, allowing complex graphical native applications to be ported, such as the Unity game engine and Google Earth. It can probably port your codebase, too!
While Emscripten mostly focuses on compiling C and C++ using Clang, it can be integrated with other LLVM-using compilers (for example, Rust has Emscripten integration, with the wasm32-unknown-emscripten target).
For detailed instructions and tutorials, visit the Emscripten Website.
There are two primary ways to install Emscripten:
Using the Emscripten SDK (emsdk) (Recommended) The easiest way to get started is by using the Emscripten SDK. Follow the instructions on the downloads page to install it.
From a Git Checkout (Manual Installation) If you have cloned the repository from Git, you can install the dependencies manually and then run the bootstrap script:
./bootstrap.py
For more details, see the developer guide.
Run emcc like you would gcc or clang:
$ emcc hello.c -o hello.js $ node hello.js Hello, world!
Emscripten will compile your code into a WebAssembly module along with a JavaScript file that can load and run it. You can then run the resulting JavaScript in your browser or under Node.js (or Deno or Bun).
Emscripten can also generate a sample HTML page that then loads the JavaScript:
$ emcc hello.c -o hello.html
You can then serve the generated hello.html using the emrun tool, or a web server of your choosing.
For information on how to contribute to the project, see CONTRIBUTING.md and the Contributing section on the website.
Emscripten is available under 2 licenses, the MIT license and the University of Illinois/NCSA Open Source License.
Both are permissive open source licenses, with little if any practical difference between them.
The reason for offering both is that (1) the MIT license is well-known and suitable for a compiler toolchain, while (2) LLVM‘s original license, the University of Illinois/NCSA Open Source License, was also offered to allow Emscripten’s code to be integrated upstream into LLVM. The second reason became less important after Emscripten switched to the LLVM wasm backend, at which point there isn't any code we expect to move back and forth between the projects; also, LLVM relicensed to Apache 2.0 + exceptions meanwhile. In practice you can just consider Emscripten as MIT licensed (which allows you to do pretty much anything you want with a compiler, including commercial and non-commercial use).
See LICENSE for the full content of the licenses.