The DOOM of Async Frameworks: Write Once, Compile Everywhere, Process Everything.
Nodepp-WASM brings the raw performance of C++ and the "Shared-Nothing" architecture of Nodepp to the browser. By leveraging Emscripten and WebAssembly, Nodepp allows you to build complex, concurrent web applications, VR experiences, and high-performance tools with a familiar, asynchronous C++ syntax.
Stop compromising between web accessibility and native speed. With Nodepp, your browser-based applications benefit from the same Zero-Copy Slicing and O(1) Event Loop used in our server and embedded versions.
🔗: Nodepp The MOST Powerful Framework for Asynchronous Programming in C++
To showcase Nodepp for Web, we ported the classic Duck Hunt to Virtual Reality, running natively in the browser via WebAssembly. This project pushes the limits of web-based VR by combining low-level C++ performance with modern Web APIs.
ezgif-7a54260198ce48cc.mp4
Play it now: Duck Hunt VR on Itch.io
Cursed-Luna is a high-performance remake of the Global Game Jam 2018 classic. Originally built around the theme of Transmission, this version has been completely rewritten in C++ using Nodepp and Raylib to bring tight gameplay mechanics to the browser via WebAssembly.
ezgif-7b0a4670cfd24b91.mp4
Play it now: Cursed-Luna on Itch.io
#emscripten
- 🪟: pacman -S mingw-w64-ucrt-x86_64-emscripten
- 🐧: sudo apt install emscripteninclude(FetchContent)
FetchContent_Declare(
nodepp
GIT_REPOSITORY https://github.com/NodeppOfficial/nodepp-wasm
GIT_TAG origin/main
GIT_PROGRESS ON
)
FetchContent_MakeAvailable(nodepp)
#[...]
target_link_libraries( #[...]
PUBLIC nodepp #[...]
)- Near-Native Speed: Execute C++ logic at nearly the speed of light within the browser sandbox.
- ASYNCIFY Integration: Seamlessly handle asynchronous C++ logic within the single-threaded environment of the browser.
- Smart Memory: Uses the same
ptr_tarchitecture to manage memory safely, preventing leaks in long-running web sessions. - Unified API: Use the exact same
http::fetchandws::connectcode on WASM that you use on Linux or Arduino.
Nodepp abstracts the complex Emscripten Fetch API into a clean, Promise-based structure.
#include <nodepp/nodepp.h>
#include <nodepp/http.h>
using namespace nodepp;
void onMain() {
fetch_t args;
args.method = "GET";
args.url = "http://localhost:6931/";
http::fetch( args )
.fail([=]( except_t err ){ console::log( err ); })
.then([=]( http_t cli ){
console::log( stream::await( cli ) );
console::log( "->", cli.status );
});
}Nodepp also suports modern protocols seamlessly like websocket for real-time aplication.
#include <nodepp/nodepp.h>
#include <nodepp/ws.h>
using namespace nodepp;
void onMain() {
auto srv = ws::connect( "wss://localhost:8000" );
srv.onConnect([=]( ws_t cli ){
cli.onData([]( string_t data ){
console::log( data );
});
cli.onClose([](){
console::log( "done" );
});
});
}Nodepp is the only framework that lets you share logic between the deepest embedded layers and the highest web layers.
- Hardware: NodePP for Arduino
- Desktop: Nodepp for Desktop
- Browser: Nodepp for WASM
Nodepp is an open-source project that values Mechanical Sympathy and Technical Excellence.
- Sponsorship: Support the project via Ko-fi.
- Bug Reports: Open an issue via GitHub.
- License: MIT.
Nodepp is distributed under the MIT License. See the LICENSE file for more details.