Emscripten 4.0 Released: C/C++ to WebAssembly Compiler

published Issue INTP = “https://emscripten.org /”> EMSCRIPTEN 4.0 , which allows you to compile code for C/C ++ and other languages ​​for which there are fronties based on LLVM, in the universal low -level WebasemBly intermediate code. The result can be used to integrate with JavaScript projects, launch in the Web browser, use in Node.js or create separate multifaceted applications launched using WASM RUNTIME. The project code is distributed under the MIT license. The compiler uses the developments of the LLVM project, and the library binaryen .

…..

The main goal of EMSCRIPEN is the creation of a tool that allows you to execute the code in the Web, regardless of the programming language in which this code is originally written. In compiled applications, calls of standard C and C ++ libraries (LIBC, LIBCXX), C ++ extensions, multi -traffic based on PTHREADS, API Posix and many multimedia libraries can be used. Separately, the API is provided for integration with the Web API and the code on JavaScript.

EMSCRIPTEN supports the broadcast of the SDL2 library output through canvas, and also implements support egl via APIs Webgl, which allows you to transform into Webassembly graphic graphic pans and games (for example, there is The port of Tulkit QT, supporting the Game engines Unreal Engine and Unit, as well as the simulation engine of physical processes Bullet).

In addition to compiling code on C/C ++ separately develops projects for launching in Browsers of interpreters and virtual machines for LUA, C#, Python, Ruby and Perl. In addition, it is possible to use frontants to LLVM, different from Clang, for example, frontants for languages, such as Swift, Rust, D and Fortran.

Assignment of version 4.0 number is associated with amendments that violate compatibility at the ABI level (when re -taxing the project in EMSCRIPTEN 4.0, it will be necessary to re -reduce object files and libraries collected by the past versions of EMSCRIPEN). Basic changes in EMSCRIPEPTEN 4.0:

  • Added option “-swasm_leagchi_exceptions” to choose between old < /a> and new exclusion processing mechanisms. By default, the old mechanism continues to be used, since not all browsers have implemented the capabilities of Webassembly to work new exceptions.

/Reports, release notes, official announcements.