WhoBuilt

Introducing cpp.js.org: Revolutionizing C++ and JavaScript Bridging

Sep 9, 2025· 21 min· 953 views·Watch on YouTube

Speaker

Dr. Kubilay Küçük of cpp.js.org presents its C++ to JavaScript toolset at RUC 2025, with Callstack named as a source of feedback.

A shared C++ codebase for web and mobile

Küçük describes cpp.js.org as a toolset for C++ developers who want to bring existing skills and code to web and mobile. The goal is to write application logic in regular C++ and build the interface with React Native, while supporting other JavaScript environments too.

Create projects and call C++ from JavaScript

The project setup starts with `npm create cppjs@latest`; the first installation may take five to ten minutes. Templates cover web, mobile, backend, cloud, and libraries. In the Hello World example, JavaScript imports a C++ header, waits for `initCPPJS`, then calls C++ functions and creates objects.

How the bridge and platform builds work

Küçük outlines tools that generate interfaces between C++ and JavaScript, including CPPJS, SWBind, Emscripten Plus, and JSI++. Web builds use Emscripten, while mobile builds use the Android NDK or Xcode to produce native binaries for ARM64 and x86-64 simulators. Bundler plugins connect headers to projects; Küçük says they cover about 90% of available bundlers.

Use and port existing C++ libraries

Küçük says 15 libraries are already available to import, including SQLite. He demonstrates a hiking app that could use GDAL to query large digital elevation model files offline, and describes using ZIP through an app config and import. To port another library, developers provide its source repository and version in build and config files, then run `cppjs build`.

Performance, maintenance, and contribution

Küçük invites library experts to contribute and shares contact details for cpp.js.org and a new library email address. He says C++ can outperform equivalent JavaScript code, while the bridge matches Emscripten performance; primitive values are copied and objects are shared through pointers. Functions that return pointers and object cleanup may need manual handling.

Takeaways

  • Keep application logic in C++ and use a JavaScript framework for the interface across supported targets.
  • Try the provided project templates before building a custom setup; the first installation takes several minutes.
  • Check the library repository before porting a dependency yourself; the talk lists 15 available libraries.
  • For an unsupported library, specify its source and version in the build configuration and run `cppjs build`.
  • Plan for manual pointer handling and object cleanup where needed.

Mentioned in this talk

Search inside this talk

What was claimed 8

  • integrates with
    CPP.js integrates with WebAssembly
    “bring C++'s existing computational abilities and performance features to the React Native ecosystem and WebAssembly”
    YouTube
    Unverified1 source· Talk
  • integrates with
    CPP.js integrates with React Native
    “bring C++'s existing computational abilities and performance features to the React Native ecosystem”
    YouTube
    Unverified1 source· Talk
  • feature
    CPP.js: Supports C++ application logic in JavaScript projects targeting web, mobile, backend, and cloud.
    “write all your application logic as regular C++ code”
    YouTube
    Unverified1 source· Talk
  • uses
    “we have another tool we developed called Emscripten Plus”
    YouTube
    Unverified1 source· Talk
  • uses
    “So we created JSI++, another tool that makes Embind compatible with JSI.”
    YouTube
    Unverified1 source· Talk
  • feature
    CPP.js: 15 libraries are available and ported.
    “Already, 15 libraries are available and ported.”
    YouTube
    Unverified1 source· Talk
  • integrates with
    CPP.js integrates with GDAL
    “with one line of code, import GDAL”
    YouTube
    Unverified1 source· Talk
  • metric
    CPP.js: The speaker says its bridge matches Emscripten performance, with no extra overhead beyond existing overhead.
    “We literally match the performance of Emscripten”
    YouTube
    Unverified1 source· Talk

Related talks