Paozhu (็‚ฎ็ซน ๐Ÿงจ) is a high-performance full-stack web framework purpose-built for rapid C++ development. Founded in 2022 and battle-tested across 20+ production projects โ€” including WeChat Mini Programs, foreign-trade platforms, multi-tenant SaaS, enterprise applications, and IoT smart devices โ€” Paozhu brings scripting-language development velocity to the C++ world, enabling teams to ship up to 1,000 lines of business code per day with a single binary.

Sources indicate that paozhu ships with a fully hand-rolled native protocol stack: HTTP/1.1, HTTP/2 (including h2c), WebSocket, MySQL, PostgreSQL, SQLite, and Redis โ€” no third-party HTTP/ORM dependencies. Written in C++20 on top of Asio coroutines, it runs on Linux, macOS, and Windows with zero memory leaks or crashes reported in production.

Paozhu's dual-pool design is inspired by Go's goroutine scheduler:.

Recent findings suggest that business code freely chooses between coroutine functions (asio::awaitable) and synchronous functions (std::string). The framework automatically routes each request to the appropriate pool, keeping the scheduling transparent.

Paozhu's native ORM is one of the very few C++ ORMs with a hand-written MySQL protocol implementation in production. It supports three databases with a unified API:.

All long-connection clients support SSL/TLS and background task loops with configurable timeouts.

Zero-config URL registration via C++ annotations in controller .cpp files:.

The annotation handler runs at CMake build time, extracts all //@urlpath markers, auto-generates header files, and registers the routing table. Optional middleware chain (e.g., islogin โ†’ admin_listarticle) enables clean separation of concerns.

HTML templates are compiled into C++ code that runs in-process at request time โ€” no disk I/O, no template engine overhead. Templates use <%c ... %> blocks to embed C++ expressions and include_sub() for partials. The compiled views are registered as callable functions in the framework's routing table, keeping the hot path purely in-memory.

http::obj_val is a 16-byte key-value object with script-language ergonomics โ€” used for JSON I/O, session data, view rendering, and API responses:.

Each module is compile-time optional โ€” only enable what you need:.

Open http://localhost/hello โ€” you'll see your first response from the Paozhu server.

For the full documentation, visit hggq.github.io/paozhudocs. Paozhu is licensed under MIT.

๐Ÿ“Œ Read also:

โ†’ Read original article