Write your JavaScript code as usual. No special syntax or restrictions!
// the hello world program
console.log('Hello World!');
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!"));}
Build and run your C++ program — it behaves exactly like your original JavaScript!
./js_cmp test.js && g++ test.js.cpp
> Hello World!
Want to learn more about the inner workings of JS-CMP? Our blog covers key concepts, design decisions, and development updates.
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.
April 28, 2025
Boost the performance of std::string using an alternative data structure.