Cheerp can be used both to port existing C/C++ applications and libraries to run in the browser, or to create high-performance web applications and WebAssembly components from scratch.
It's been over a year since the previous release of Cheerp ( Cheerp 2.7 ), and this new version is packed with new features and optimizations that, once again, move the state of the art of using C++ as a programming language for Web applications. and games.
Most importantly, with this release we are making a significant change to Cheerp's licensing model. As of Cheerp 3.0, all core compiler components and libraries are now permissively licensed under the Apache 2.0/LLVM license. This marks a radical departure from our previous GPLv2/dual commercial license model, allowing Cheerp 3.0 to be used for any purpose, without restriction.
Compared to the Emscripten compiler, Cheerp generates more optimized and compact WebAssembly intermediate code (On average, the resulting file sizes are 7% smaller.)
Conceptually, the differences boil down to the fact that script is used as the object format of WebAssembly and performs binding and optimization in the post-processing stage of WebAssembly (wasm-opt). Cheerp uses LLVM bytecode as an intermediate representation for libraries and object files, allowing for broader project-wide optimizations using LLVM-level metadata without the need for post-processing.
In addition, Cheerp uses the PreExecuter optimizer to preemptively execute code at compile time, for example, to convert constructors used to initialize global objects to constants. In addition, PartialExecuter is used during compilation, which, based on parsing the function's parameters, removes code that is guaranteed not to be used at execution.
Cheerp provides the means to build complete C++ web applications that support both backend and frontend in a single code base.
Finally, if you are interested in knowing more about it, you can check the details in the following link
The compiler code is based on the LLVM and Clang developments and includes additional optimizations to improve performance and reduce the size of the compiled output.
Be the first to comment