Skip to content
项目

关于

用于使用 C++ 编写可靠异步应用的运行时,提供 I/O、网络、调度、定时器等功能。

系统与基础设施

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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.

https://github.com/user-attachments/assets/9b870671-3854-444f-893d-40fdce31a629

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

https://github.com/user-attachments/assets/a8b4d56d-0291-4aa8-98e6-926116215f8f

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.

探索相关项目

加载中…