Emscripten

Print Print
Reading time 4:35

Emscripten
Emscripten logo.svg
Original author(s)Alon Zakai
Stable release
2.0.13 / 29 January 2021; 4 months ago (2021-01-29)[1]
Repository Edit this at Wikidata
Written inC, C++, JavaScript[2]
TypeCompiler
LicenseMIT License, University of Illinois/NCSA Open Source License
Websiteemscripten.org Edit this on Wikidata

Emscripten is an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly[3] (or to a subset of JavaScript known as asm.js,[4] its original compilation target before the advent of WebAssembly in 2017), primarily for execution in web browsers.

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. With the more recent development of the WebAssembly System Interface (WASI)[5] and WebAssembly runtimes such as Node.js, Wasmtime,[6] and Wasmer,[7] 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, MeshLab,[8]Bullet physics.[9]AutoCAD,[10] and a subset of the Qt application framework.[11] Other examples of software ported to WebAssembly via Emscripten include the following:

Game engines

The Unity, Godot, and Unreal game engines provide an export option to HTML5, utilizing Emscripten.[12][13][14]

Frameworks & toolkits

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

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.[16][17][18]

See also

References

  1. ^ "emscripten-core/emscripten: Releases". emscripten-core/emscripten. GitHub. Retrieved 2021-02-09.
  2. ^ "emscripten-core/emscripten: Emscripten: An LLVM-to-JavaScript Compiler". C: 40.0%; C++: 34.4%; JavaScript: 17.4%.
  3. ^ https://github.com/kripken/emscripten/wiki/WebAssembly
  4. ^ Walton, Zach (2012-04-04). "Easily Port C++ To HTML5/JavaScript With Emscripten". WebProNews. iEntry Network. Archived from the original on 2013-07-30. Retrieved 2012-04-25.
  5. ^ The Wasmtime Project. "WASI: The WebAssembly System Interface". WASI.dev. The Wasmtime Project. Retrieved 2021-02-10.
  6. ^ The Wasmtime Project. "Wasmtime: A small and efficient runtime for WebAssembly & WASI". Wasmtime.dev. The Wasmtime Project. Retrieved 2021-02-10.
  7. ^ Wasmer. "Wasmer: The Universal WebAssembly Runtime". Wasmer.io. Wasmer. Retrieved 2021-02-10.
  8. ^ http://www.meshlabjs.net - Homepage of the experimental, client based, javascript, version of MeshLab that runs inside a browser
  9. ^ "Porting Examples and Demos". Emscripten GitHub wiki. Retrieved 2016-03-01.
  10. ^ "The Future of AutoCAD". Through the Interface. Retrieved 2018-05-09..
  11. ^ a b "Qt for WebAssembly".
  12. ^ "Unity game engine heading to the browser without plug-ins". Ars Technica. Retrieved 2016-03-01.
  13. ^ "The future of scripting in Unity – Unity Blog". Unity Technologies Blog. Retrieved 2016-03-01.
  14. ^ "Tappy Chicken". www.unrealengine.com. Retrieved 2016-03-01.
  15. ^ "openFrameworks setup for Emscripten". openFrameworks. Retrieved 2016-03-04.
  16. ^ Ohlheiser, Abby (2015-01-05). "You can now play nearly 2,400 MS-DOS video games in your browser". Washington Post. Retrieved 2015-01-08.
  17. ^ Each New Boot a Miracle by Jason Scott (December 23, 2014)
  18. ^ "Internet Archive Search: "collection:softwarelibrary_msdos"". archive.org. Retrieved 2016-03-01.

External links

By: Wikipedia.org
Edited: 2021-06-18 12:36:28
Source: Wikipedia.org