• Stars
    star
    1,018
  • Rank 45,203 (Top 0.9 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 11 years ago
  • Updated 6 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
4,533
star
2

cheerpj-meta

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

cheerp-compiler

C++ to JavaScript/WebAssembly compiler
C++
292
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

cheerpx-flash

CheerpX for Flash - extend the life of Flash applications thanks to HTML5 virtualization
61
star
7

cheerpj-applet-runner

CheerpJ Applet Runner - Chrome Extension to Enable Java Applets
HTML
57
star
8

browsercraft

Unmodified Minecraft 1.2.5 in the browser using CheerpJ
HTML
50
star
9

cheerpnet

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

cheerp-libcxx

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

cheerp-utils

Cheerp headers and utils
C++
32
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
17
star
18

cheerpx_hello

A simple CheerpX hands-on tutorial
HTML
10
star
19

cheerp-musl

A Cheerp-enabled libc implementation
C
9
star
20

cheerpj-natives

JS implementations of JNI libraries for CheerpJ
JavaScript
9
star
21

esreduce

Mimimize EcmaScript tests by manipulating the AST and checking the result
JavaScript
7
star
22

ts2cpp

A tool to generate C++ headers from TypeScript declaration files
TypeScript
7
star
23

leaningtech.github.io

Migrated to labs.leaningtech.com
HTML
4
star
24

labs

Leaning Technologies developer site
MDX
4
star
25

chrome-profiling

Collection of helpful assets for linux perf
Python
3
star
26

macos-utils

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

cheerpj-jnlp-runner

Run Java Web Start Applications without Java
2
star
28

cheerpj-example-applet

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

cheerpj-example-swingset3

SwingSet3 in the browser using CheerpJ
HTML
1
star
30

cheerpx-meta

Run X86 binary applications and libraries in the browser
1
star
31

cheerpx-games-runner

An open-source Chrome Extension to run your games directly in the browser
JavaScript
1
star