Can you convert C++ Applications into Web Apps?

Do you have a high-performance application or library written in C/C++ that you would like to make available to a wider audience by turning into a Web App?

Until recently, this was extremely difficult, and may even have required a complete re-write of the software in JavaScript.

However, with Cheerp, existing code bases, including libraries and full applications, can be ported automatically to HTML5, saving you time and money.

What is Cheerp?

Cheerp is an open-source, commercial C/C++ compiler for HTML5 web applications, capable of compiling C/C++ to WebAssembly, JavaScript or a combination of the two.

Cheerp is the most advanced and flexible solution to bring C++ code to the Web. It is based on the industry-standard Clang/LLVM stack, and provides a robust workflow with sensible defaults, clear error messages and gcc-like command-line options that allow for an easy integration in IDEs and continuous integration environments. 

Cheerp runs on Windows, macOS and Linux, making it possible for C++ developers to create Web Applications in a seamless manner on their system of choice.

What can you do with Cheerp?

Cheerp is a powerful, flexible and robust tool, which can be used in multiple ways:

Convert existing C++ application to Web applications: Cheerp can recompile any large scale C++ application into an HTML5 web application, allowing you to provide your users with a modern, cloud integrated user experience with minimal interventions on the core business logic.

By compiling your C++ code, there is no need to rewrite your application from scratch in JavaScript, saving you time, resources and the headaches of maintaining two code bases in parallel.

Compile C++ libraries to WebAssembly, and integrate them into HTML5 applications: as a general rule, if you have a problem, there is a C/C++ library (either open source or proprietary) that will solve it. Thanks to the advanced interoperability features of Cheerp, compiling and integrating a C/C++ library into an HTML5 web app could not be more straightforward.

Compile native C++ games to HTML5: Cheerp allows you to quickly port your C++ game to the web, with no code rewriting. Modern web browsers are powerful gaming platforms, including 3D graphics (through WebGL), programmable sound pipeline (through WebAudio) and motion sensors (accelerometers and GPS). You can use Cheerp to convert full games or to offer a playable teaser trailer or demo that can be started with a single click.

How Cheerp Works

The intended workflow of Cheerp usually looks like this:

  1. An existing C/C++ codebase solves a problem you want (e.g. encoding/decoding, a physics library, or something else completely specific to your field). You decide to port this codebase to WebAssembly/JavaScript to integrate it into an HTML5 application.
  2. You go through the codebase, and tag the relevant APIs that you need exported to HTML5;
  3. Using Cheerp, you compile the codebase ahead of time into WebAssembly and JavaScript;
  4. You serve the .js and .wasm files on an HTTP server, alongside the rest of your HTML5 application, all to be executed by the browser client-side;
  5. If you need to change or add functionality to the component, you edit the C/C++ source;
  6. Go back to step 3: compile your code, serve it, and iterate.

Why Cheerp?

Cheerp produces WebAssembly code that is often faster and smaller in size, then Emscripten, while retaining more flexibility in accessing the DOM and WebAPIs and libraries thanks to its advanced interoperability features. 

Cheerp is an actively developed project backed by Leaning Technologies, a company with years of experience in compile-to-JavaScript and compile-to-WebAssembly solutions, and a strong technical team that can provide support and professional services if needed.

Tested on millions of lines of code, chosen by many commercial products, Cheerp is the best technology to enable complex, large-scale applications to be converted to a Web application.

For more information on how Cheerp can help your organization to leverage your existing C++ code to develop HTML5 web applications that work on any device, with no need for plug-ins or download, please get in touch.

Menu