Run C++ inside a browser app, a Node.js service, a Cloudflare Worker, a React Native app or a command-line tool. Each example is created with the site's own command, installed from npm, built and run; the commands and the output they produced are recorded as they happened.
Web
A browser app that calls C++ through the plugin for your bundler. Pick the framework and bundler you use; the C++ and the result are the same.
CREATE
npm create crossbind@beta -- my-app Web React Vite
Needs Node.js 24+, Docker (the toolchain image is pulled on the first build) and Playwright browsers for the e2e step.
The page shows Matrix multiplier with c++ => J₃ * (2*J₃) = 6*J₃, computed in C++. npm run e2e:prod checks that string in chromium, firefox and webkit (3 passed).
npm run build runs crossbind build -p wasm -a wasm32 -r st -e node -b release and writes dist/*.node.js + dist/*.node.wasm; the script prints Matrix multiplier with c++ => J₃ * (2*J₃) = 6*J₃.
Cloudflare Worker
A Worker that answers HTTP requests from C++; the same wasm, single-threaded, in-memory filesystem.
npm run build writes dist/*.edge.js + dist/*.edge.wasm; wrangler dev reports Ready on http://localhost:8787 and the request returns Hello World, greetings from c++. with status 200.
React Native (Expo)
An Expo app calling the same C++ over JSI as native machine code; no wasm on the phone. One project, both platforms.
CREATE
npm create crossbind@beta -- my-app Mobile "React Native" Expo
Needs Node.js 24+, Xcode with an iOS simulator, and CocoaPods.
run:ios runs expo run:ios --configuration Release: it generates the native project, installs the pods, builds the app and starts it on the simulator; the screen shows Matrix multiplier with c++ => J₃ * (2*J₃) = 6*J₃.
WASI tools
Upstream GDAL command-line tools as npm executables, run by wasmtime: no compiler, no toolchain image, nothing to build.
gdalinfo-wasi --version prints GDAL 3.13.3 "Iowa City", released 2026/08/13; ogrinfo-wasi --formats lists the drivers, starting with MEM, PCIDSK and PDF.
Verified 11 September 2026 against crossbind 2.0.0-beta.56, projects created with [email protected].