Skip to content
NodeppOfficialPublic

About

A runtime for writing reliable asynchronous applications with C++. Provides I/O, networking, scheduling, timers, ...

Topics

Resources

Code of conduct

Stars

217 stars

Watchers

4 watching

Forks

Repository files navigation

Nodepp: An Asynchronous Runtime for C++

MIT License Platform Build Status Valgrind Memory Test XERJ Corpus Hub contributor

Nodepp is an asynchronous C++ runtime that unifies application development under a single syntax, a single codebase, and a single execution model. It starts from a simple premise: you don't need a different language for every layer of your application. The same code that runs on a Linux server can run in a browser via WASM, on an ESP32, or on an Arduino Nano — without changes.

The inspiration doesn't come from a modern framework, but from Doom. Doom wasn't revolutionary for its graphics, but for its portability: it ran on hardware nobody imagined because its design didn't depend on a specific platform. That same philosophy guided Nodepp — a runtime so universal it runs on anything with a C++11 compiler, from 2KB of RAM to 64 cores. It's not a framework tied to an ecosystem. It's a runtime that adapts to the hardware, not the other way around.

Most runtimes grow until they can't be understood. Nodepp went the other direction. ~3,800 lines for the entire core. 2KB for the binary. 0% CPU when idle. No STL, no exceptions, no RTTI — not because they're bad, but because they aren't necessary. The result is a runtime small enough to fit on any controller and simple enough to audit completely. Nothing to trust. Nothing to hide.

Featured Projects

Enigma Machine - Arduino Nano: A fully functional Enigma machine running on 2KB of RAM.

ezgif-7f4dec232396a556.mp4

Spacesus.io: P2P multiplayer game built on Nodepp, WebRTC, and Ungine.

out.mp4

Benchmarks

Metric Bun (v1.3.5) Go (v1.18.1) Nodepp (v1.4.0)
Req / Second 5,985.74 6,139.41 6,851.33
Memory (RSS) 69.5 MB 14.1 MB 2.9 MB
Max Latency 1,452 ms 326 ms 245 ms
p99 Latency 1,159 ms 249 ms 187 ms
CPU Usage 98.7% 99.3% 100.0%

Benchmark on Chromebook Apollo Lake, 1000 concurrent connections. View full benchmarks

Quick Start

#include <nodepp/nodepp.h>
#include <nodepp/worker.h>
#include <nodepp/http.h>

using namespace nodepp;

void onParallel() {

    auto server = http::server([]( http_t cli ){
         cli.write_header( 200, header_t({}) );
         cli.write( "hello world" );
    });

    server.listen( "0.0.0.0", 8000 );
    console::log( "http://localhost:8000" );

}

void onMain(){ worker::parallel( &onParallel, os::cpus() ); }

Ecosystem

Module Description
ExpressPP Express-style HTTP server
ApifyPP 64-byte RPC
Nodepp-Redis Redis client
Nodepp-SQLite SQLite client
Nodepp-Argon2 Password hashing

Platforms

Platform status
Linux ✅
Windows ✅
macOS ✅
WASM (browser) ✅
ESP32 ✅
Arduino ✅

License

MIT. Use it anywhere.

About

A runtime for writing reliable asynchronous applications with C++. Provides I/O, networking, scheduling, timers, ...

Topics

Resources

Code of conduct

Stars

217 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages