Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
FAQs (Frequently asked questions)
The code generated by cheerp is currently made large by boilerplate code coming from the initialization of the C++ library. This is, of course, a fixed cost which is especially noticeable if you compile an "Hello World", but not so relevant on a large scale codebase. This problem is fixed in current master and version 1.2 of Cheerp.
If you only use browser APIs in your code and no functions from the C or C++ library you can compile using the
-nostdlib option. This will reduce the code size by not linking in initialization code for
<iostream> functionalities. Please node that Cheerp already compiles only the code which is actually used, but currently the static initializations of
std::cout and similar objects are seen as executed code.
Does Cheerp enforce C++ type safety at run-time?
What features of C++ are currently not supported?
cheerp currently supports most of C++ features. While we try very hard to have a full C++14 compatibility, some features are currently not supported:
- Global ordering of pointers. This means that pointers have a definite ordering (as required by the standard) only if they are part of the same array. Unrelated pointers at the moment have undefined ordering, which means that constructs like
std::map<void*>will not work in cheerp.
Is cheerp free software? Or is it proprietary?
Cheerp is 100% free software. The cheerp compiler itself is licensed under the University of Illinois/NCSA license, like the LLVM and clang projects the cheerp compiler is based on. Cheerp headers and libraries which provide access to browser and other functionalities both at low and high level are released under the GPLv2+ license.
Should I release my code as GPL if I use cheerp?
There are two cases:
- If you don't want to release the source code of your programs, Leaning Technologies Ltd (the company behind the development of Cheerp) offers proprietary-friendly commercial licenses and support. Please visit http://leaningtech.com for more infomation.
- If you are using our free GPL version you should release the code. You are using GPL headers and linking with GPL libraries so your code is considered derived work of cheerp.