Emscripten

From Wikipedia, the free encyclopedia

Template:Short description

Page Module:Infobox/styles.css has no content.

Emscripten
[[Programmer|Original authorTemplate:Pluralize from text]]Alon Zakai
Initial release22 October 2011; 14 years ago (2011-10-22)[1]
Template:Infobox software/simple
Written inC, C++, JavaScript[2]
EnginePage Template:Plainlist/styles.css has no content.Template:EditAtWikidata
TypeCompiler
LicenseMIT License, University of Illinois/NCSA Open Source License
WebsiteScript error: No such module "WikidataIB".
RepositoryPage Template:Plainlist/styles.css has no content.

Script error: No such module "Check for conflicting parameters".

Emscripten is an LLVM/Clang-based compiler that compiles LLVM IR to WebAssembly,[3] 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. It even emulates an entire POSIX operating system, enabling programmers to use functions from the C standard library (libc).[4]

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,[8] MeshLab,[9] Bullet physics,[10] AutoCAD,[11] and a subset of the Qt application framework.[12] 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.[13][14][15] Unreal Engine had this export option but it has been migrated out of the engine to a community member plug in.[16] The Source Engine, has a community developed port for Emscripten dubbed "HalfLife2JS".[17]

Frameworks & toolkits

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

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.[19][20][21]

Creation

Emscripten was created by Alon Zakai in 2010, motivated by his desire to port his fork of the open-source first-person shooter game Sauerbraten, known as Syntensity,[22] to the web. Sauerbraten (also known as Cube 2) is an open-source FPS game,[23] and Syntensity was Zakai's project that extended the Cube 2 Engine for greater flexibility. Observing the increasing shift of applications to web browsers, Zakai began developing Emscripten as an LLVM-to-JavaScript compiler, aiming to make it possible to run existing C and C++ code, such as game engines, directly in the browser. In early blog posts, Zakai explained that his long-term goal was "to run Syntensity, or a smaller version of it, on the web",[24] and Emscripten was released as open source shortly after its initial development, making it available for the broader community to experiment with and contribute to.[25][26]

See also

Lua error in mw.title.lua at line 404: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

References

Page Template:Reflist/styles.css has no content.

  1. ^ Page Module:Citation/CS1/styles.css has no content.Zakai,Alon (22 October 2011). "Emscripten: An LLVM-to-JavaScript compiler". Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion. OOPSLA. pp. 301–312. doi:10.1145/2048147.2048224. ISBN 978-1-4503-0942-4.
  2. ^ Page Module:Citation/CS1/styles.css has no content."emscripten-core/emscripten: Emscripten: An LLVM-to-JavaScript Compiler". GitHub. C: 40.0%; C++: 34.4%; JavaScript: 17.4%.
  3. ^ WebAssembly · emscripten-core/emscripten Wiki · GitHub
  4. ^ Page Module:Citation/CS1/styles.css has no content.Clark, Lin. "Standardizing WASI: A system interface to run WebAssembly outside the web – Mozilla Hacks - the Web developer blog". Mozilla Hacks – the Web developer blog. Mozilla. Retrieved 31 October 2022.
  5. ^ Page Module:Citation/CS1/styles.css has no content.The Wasmtime Project. "WASI: The WebAssembly System Interface". WASI.dev. The Wasmtime Project. Retrieved 2021-02-10.
  6. ^ Page Module:Citation/CS1/styles.css has no content.The Wasmtime Project. "Wasmtime: A small and efficient runtime for WebAssembly & WASI". Wasmtime.dev. The Wasmtime Project. Retrieved 2021-02-10.
  7. ^ Page Module:Citation/CS1/styles.css has no content.Wasmer. "Wasmer: The Universal WebAssembly Runtime". Wasmer.io. Wasmer. Retrieved 2021-02-10.
  8. ^ Page Module:Citation/CS1/styles.css has no content."sqlite3 WebAssembly & JavaScript Documentation Index". SQLite. Retrieved 2023-05-08.
  9. ^ http://www.meshlabjs.net - Homepage of the experimental, client based, javascript, version of MeshLab that runs inside a browser
  10. ^ Page Module:Citation/CS1/styles.css has no content."Porting Examples and Demos". Emscripten GitHub wiki. Retrieved 2016-03-01.
  11. ^ Page Module:Citation/CS1/styles.css has no content."The Future of AutoCAD". Through the Interface. Retrieved 2018-05-09..
  12. ^ a b Page Module:Citation/CS1/styles.css has no content."Qt for WebAssembly".
  13. ^ Page Module:Citation/CS1/styles.css has no content."Unity game engine heading to the browser without plug-ins". Ars Technica. 18 March 2014. Retrieved 2016-03-01.
  14. ^ Page Module:Citation/CS1/styles.css has no content."The future of scripting in Unity – Unity Blog". Unity Technologies Blog. Retrieved 2016-03-01.
  15. ^ Page Module:Citation/CS1/styles.css has no content."Defold HTML Development". Defold Documentation. Retrieved 2023-12-18.
  16. ^ Page Module:Citation/CS1/styles.css has no content."Developing HTML5 with Unreal". Unreal Documentation. 18 December 2023. Retrieved 2018-12-18.
  17. ^ Page Module:Citation/CS1/styles.css has no content.Half-Life 2: Javascript, EmSource, 2025-04-13, retrieved 2025-04-14
  18. ^ Page Module:Citation/CS1/styles.css has no content."openFrameworks setup for Emscripten". openFrameworks. Retrieved 2016-03-04.
  19. ^ Page Module:Citation/CS1/styles.css has no content.Ohlheiser, Abby (2015-01-05). "You can now play nearly 2,400 MS-DOS video games in your browser". The Washington Post. Retrieved 2015-01-08.
  20. ^ Each New Boot a Miracle by Jason Scott (December 23, 2014)
  21. ^ Page Module:Citation/CS1/styles.css has no content."Internet Archive Search: "collection:softwarelibrary_msdos"". archive.org. Retrieved 2016-03-01.
  22. ^ Page Module:Citation/CS1/styles.css has no content.Kripken (2009-04-22). "Scriptensity: Intro". Scriptensity. Retrieved 2025-07-24.
  23. ^ Page Module:Citation/CS1/styles.css has no content."Cube 2: Sauerbraten". sauerbraten.org. Retrieved 2025-07-24.
  24. ^ Page Module:Citation/CS1/styles.css has no content.Kripken (2010-08-29). "Scriptensity: Emscripten". Scriptensity. Retrieved 2025-07-24.
  25. ^ Page Module:Citation/CS1/styles.css has no content.Kripken (2010-08-14). "Scriptensity: Update on Where Things are Going". Scriptensity. Retrieved 2025-07-24.
  26. ^ Page Module:Citation/CS1/styles.css has no content."Make your own games with Syntensity". www.dedoimedo.com. Retrieved 2025-07-24.

Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.