Recently the release of the new version of the Emscripten 3.0 compiler was announced, which is characterized by allowing to compile code in C / C ++ and other languages for which LLVM-based frontends are available, in a low-level universal middleware WebAssembly.
The main goal development of the Emscripten project is to create a tool that allows you to run code on the Web, regardless of the programming language in which it is written.
script supports streaming of SDL2 library output via Canvas, and also provides OpenGL and EGL support through WebGL, allowing you to convert graphics applications and games to WebAssembly.
Virtually any portable C or C ++ code base can be compiled into WebAssembly using EmscriptenFrom high-performance games that need to render graphics, play sounds, and load and process files, to application frameworks like Qt. Emscripten has already been used to convert a very long list of real-world code bases to WebAssembly, including commercial code bases such as Unreal Engine 4 and Unity Engine.
In addition to compiling C / C ++ code, projects are developed separately to ensure that interpreters and virtual machines for Lua, C #, Python, Ruby, and Perl start in the browsers. It is also possible to apply non-Clang interfaces to LLVM available for languages such as Swift, Rust, D, and Fortran.
There are also limitations that can make some code easier to migrate - read the Portability Guidelines to determine where you may need to spend more effort.
Main new features of Emscripten 3.0
In this new version that is presented, the musl C library used in emscripten has been updated to version 1.2.2 (version 1.1.15 was used in the Emscripten 2.x branch).
From the parseTools.js library a part of the functions was removed, which are mainly used in the project: removePointing, pointingLevels, removeAllPointing, isVoidType, isStructPointerType, isArrayType, isStructType, isVectorType, isStructuralType getStructuralTypeParts, getStructuralType _IntToHex, IEEEUnHex, Compiletime.isPointerType, Compiletime.EStructileType,.
While In the shell.html and shell_minimal.html templates, the output of the error messages that occur during the emscripten operation and issued by the application through stderr it is changed by default to use console.warn instead of console.error.
It is also highlighted that added the ability to specify a specific text encoding used in file names. Encoding can be specified as a suffix when passing the file name, for example "a.rsp.utf-8" or "a.rsp.cp1251").
Finally, if you are interested in learning more about Emscripten, you can consult the details of the project in its official website.
And in the same way, you can consult documentation on the web on how to use Emscripten, a reference site that we can recommend is the Mozilla developer website: https://developer.mozilla.org.
Also, it is important to mention that the project code is distributed under the MIT license. The compiler uses developments from the LLVM project and the Binaryen library is used to generate WebAssembly and optimization. You can check your code source on GitHub.