LogoJSCMP
DocsGitHubBlogs
JSCMP transpiles your JavaScript code to C++With JSCMP, leverage the simple syntax of JavaScript script while benefiting from the speed of C++.

Performance Comparison

How does it work?

01

Write your JavaScript code as usual. No special syntax or restrictions!

// the hello world program
console.log('Hello World!');
02

Compile it using js_cmp into modern, fast C++ code.

#include "types/JsAny.hpp"
#include "global/global.hpp"
#include "types/objects/Types.hpp"

int main() {console["log"](JS::Any("Hello World!"));}
03

Build and run your C++ program — it behaves exactly like your original JavaScript!

./js_cmp test.js && g++ test.js.cpp
> Hello World!

Behind the Code...

Want to learn more about the inner workings of JS-CMP? Our blog covers key concepts, design decisions, and development updates.

Reducing Boilerplate in C++ with Macros

Reducing Boilerplate in C++ with Macros

April 29, 2025

How to uses macros to simplify operator overloading and eliminate boilerplate, define custom, expressive syntax with just a few lines of code.

Optimizing string concatenation in C++ with Rope data strucuture

Optimizing string concatenation in C++ with Rope data strucuture

April 28, 2025

Boost the performance of std::string using an alternative data structure.