Emscripten

Program converting LLVM bytecode to JavaScript From Wikipedia, the free encyclopedia

Emscripten is an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly,[4] primarily for execution in web browsers.

Quick Facts Original author(s), Initial release ...
Emscripten
Original author(s)Alon Zakai
Initial release22 October 2011 (2011-10-22)[1]
Stable release
4.0.5[2]  / 12 March 2025; 38 days ago (12 March 2025)
Repository
Written inC, C++, JavaScript[3]
TypeCompiler
LicenseMIT License, University of Illinois/NCSA Open Source License
Websiteemscripten.org 
Close

Emscripten allows applications and libraries written in C or C++ to be compiled ahead of time and run efficiently in web browsers, typically at speeds comparable to or faster than interpreted or dynamically compiled JavaScript. It even emulates an entire POSIX operating system, enabling programmers to use functions from the C standard library (libc).[5]

With the more recent development of the WebAssembly System Interface (WASI)[6] and WebAssembly runtimes such as Node.js, Wasmtime,[7] and Wasmer,[8] Emscripten can also be used to compile to WebAssembly for execution in non-Web embeddings as well.

Usage

Emscripten has been used to port a number of C/C++ code bases to WebAssembly, including Unreal Engine 3, SQLite,[9] MeshLab,[10] Bullet physics,[11] AutoCAD,[12] and a subset of the Qt application framework.[13] Other examples of software ported to WebAssembly via Emscripten include the following:

Game engines

The Unity, Defold, and Godot game engines provide an export option to HTML5, utilizing Emscripten.[14][15][16] Unreal Engine had this export option but it has been migrated out of the engine to a community member plug in.[17] The Source Engine, has a community developed port for Emscripten dubbed "EmSource"[18]

Frameworks & toolkits

openFrameworks exports native C++ applications to HTML5 via Emscripten.[19] emscripten-qt permits compiling applications written using the Qt application framework to WebAssembly.[13]

Software archiving

In December 2014, the Internet Archive launched a DOSBox emulator compiled in Emscripten to provide browser-based access to thousands of archived MS-DOS and PC programs.[20][21][22]

See also

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.