title |
---|
Cheerp - the C/C++ compiler for Web applications |
Cheerp is an open-source, commercial C/C++ compiler for Web applications. It allows to compile virtually any C/C++ code to WebAssembly and JavaScript.
Main project link: https://leaningtech.com/cheerp/
This repository is the main reference for documentation, issue tracking, and release notes. The main component is on Github: cheerp-compiler, while other repositories are at cheerp-newlib, cheerp-utils and cheerp-libs
Cheerp is a C/C++ compiler for the Web, based and integrated into the LLVM/clang infrastructure, and featuring numerous custom optimisation steps to maximise performance and minimise size of the compiled JavaScript/WebAssembly output. Thanks to this, Cheerp is the best performing, most optimised C++ to WebAssembly compiler available on the market.
Cheerp is used primarily to port existing C/C++ libraries and applications to HTML5, but can also be used to write high-performance Web applications and WebAssembly components from scratch. C/C++ gets optimised and compiled into JavaScript/WebAssembly, and can easily be integrated in a web page.
Cheerp enables C/C++ code to be compiled to a combination of WebAssembly and JavaScript (possibly asm.js when targeting legacy browsers). Compared to alternative C/C++ compilers for web applications such as Emscripten, Cheerp:
- Generates faster WebAssembly code, but can also compile to a JavaScript output with dynamic memory (garbage-collectible output), zero-overhead DOM manipulation and access to WebApis and superior C++-JavaScript interoperability.
- Allows to compile a single code base into a combination of WebAssembly and JavaScript by (optionally) tagging portions of the code with
[[cheerp::genericjs]]
and[[cheerp::wasm]]
. - Generates smaller WebAssembly outputs.
Cheerp is open-source software and is free to use for GPLv2 projects. Non-copyleft commercial licenses, commercial support and consulting packages are available from Leaning Technologies.
First time user? We recommend following the Getting started page, that will guide though this steps:
Or look at the sidebar to find lots of useful materials
You can get in touch with us using our Gitter chat, or by filing a bug on our Issue tracker.