Where C++ and the web meet
webcpp brings the best of C++ to the web, and the libraries web developers use most to C++, for everyone who builds decentralized applications.
The same code, wherever it runs
Each library is header-only C++20, built and tested with b2 on every target it declares. Each target has its purpose:
- The browser
Compiled to WebAssembly with Emscripten, beside the page's JavaScript.
- A server
As a WASI component in a WebAssembly container, run by wasmtime or a cloud.
- Native
Compiled by your own compiler, as any C++ library is.
Where to start
- For C++ developers
Getting started, building for each target, and every library's page.
- For JavaScript developers
What builds for the browser today, and what is coming: C++ called from JavaScript, and back.
- For AI developers
llms.txt and libraries.json, the catalogue for agents, and the integrations to come.
Examples
The first example comes with the visualizer: a calculator whose C++ runs in the browser, each step shown as it runs, from the JavaScript that calls into WebAssembly to the C++ inside it. The examples page lists what follows it.
What is coming