• Stars
    star
    966
  • Rank 45,440 (Top 1.0 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 10 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cheerp - a C/C++ compiler for Web applications - compiles to WebAssembly and JavaScript
title
Cheerp - the C/C++ compiler for Web applications

Discord chat GitHub Issues Latest version

Cheerp is an open-source, permissively licensed, enterprise-grade C/C++ compiler for Web applications. It allows to compile virtually any C/C++ code to WebAssembly and JavaScript.

Download the latest version of Cheerp: Latest version Latest version changelog

Main project link: https://leaningtech.com/cheerp/

This repository is the main reference for documentation, issue tracking, and release notes of Cheerp. The main component of Cheerp, i.e. the Cheerp compiler, can be found on Github: cheerp-compiler, while other repositories are at cheerp-musl, cheerp-utils and cheerp-libs

What is Cheerp

Cheerp is a C/C++ compiler to WebAssembly and JavaScript, based on 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. Using Cheerp, C/C++ code gets compiled into JavaScript/WebAssembly and optimised, with the right JavaScript interfaces being exposed, and can easily be integrated in a web application.

Cheerp is licensed under the "Apache 2.0 License with LLVM exceptions", i.e. the same license of upstream LLVM/Clang. This is a permissive license that allows virtually any use of the software.

Diagram of Cheep usage

What is unique about Cheerp?

Cheerp enables C/C++ code to be compiled to a combination of WebAssembly and JavaScript (or asm.js when targeting legacy browsers). Compared to alternative C/C++ compilers for web applications such as Emscripten, Cheerp:

  1. Generates more optimized (smaller) WebAssembly code, but can also compile to a JavaScript output with dynamic memory (garbage-collectible output), zero-overhead DOM manipulation and access to Web APIs and superior C++-JavaScript interoperability.
  2. 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]].

Cheerp is free open-source software, actively developed and maintained by Leaning Technologies. Commercial support, feature fast tracking, sponsored developoment and consulting packages are available for Enterprise customers.

Get started

First time user? We recommend following the Getting started page, that will guide though these steps:

Or look at the sidebar to find lots of useful materials

Bugs and Questions

You can get in touch with us using Discord, or by filing a bug on our Issue tracker.

More Repositories

1

webvm

Virtual Machine for the Web
HTML
2,681
star
2

cheerpj-meta

Run Java 8 applications, libraries, applets, Java Web Start, and Oracle Forms on the web without legacy plugins.
403
star
3

cheerp-compiler

C++ to JavaScript/WebAssembly compiler
271
star
4

cheerp-clang

Legacy repo, migrated to cheerp-compiler monorepo
C++
215
star
5

cheerp-llvm

Legacy repo, migrated to cheerp-compiler monorepo
LLVM
184
star
6

cheerpj-applet-runner

CheerpJ Applet Runner - Chrome Extension to Enable Java Applets
HTML
54
star
7

cheerpx-flash

CheerpX for Flash - extend the life of Flash applications thanks to HTML5 virtualization
54
star
8

cheerpnet

A virtual LAN and socket library for the Web, based on WebRTC
C++
44
star
9

browsercraft

Unmodified Minecraft 1.2.5 in the browser
HTML
33
star
10

cheerp-libcxx

Legacy repo, migrated to cheerp-compiler monorepo
C++
32
star
11

cheerp-utils

Cheerp headers and utils
C++
31
star
12

cheerp-newlib

A cheerp enabled libc implementation
C
27
star
13

cheerp-libcxxabi

Legacy repo, migrated to cheerp-compiler monorepo
C++
22
star
14

cheerp-bullet

Bullet physics library ported to JavaScript with Cheerp
C++
22
star
15

cheerp-libs

Helper libraries for Cheerp
C++
22
star
16

teeworlds-web

HTML5 of Teeworlds, a multiplayer game. Full serverless and compiled using Cheerp
HTML
21
star
17

javafiddle

Build, run, and share Java snippets in the browser
Svelte
11
star
18

cheerp-musl

A cheerp enabled libc implementation
C
9
star
19

cheerpx_hello

A simple CheerpX hands-on tutorial
HTML
9
star
20

esreduce

Mimimize EcmaScript tests by manipulating the AST and checking the result
JavaScript
6
star
21

leaningtech.github.io

Migrated to labs.leaningtech.com
HTML
4
star
22

cheerpj-natives

JavaScript
4
star
23

ts2cpp

A tool to generate C++ headers from TypeScript declaration files
TypeScript
4
star
24

macos-utils

Small utilities to forge MacOS file formats, useful to create DMG files on Linux
C++
2
star
25

chrome-profiling

Collection of helpful assets for linux perf
Python
2
star
26

cheerpj-example-applet

Run a Java applet in the browser using CheerpJ
HTML
1
star
27

cheerpj-example-swingset3

SwingSet3 in the browser using CheerpJ
HTML
1
star
28

labs.leaningtech.com

Leaning Technologies Developer website
MDX
1
star