The Intertwine C++ framework
intertwine-cpp-framework is a C++11 foundation library for server-side applications. Built on libhv, it provides routing, middleware, HTTP/HTTPS/TCP/WebSocket transport, file delivery, asynchronous work, and common utility components.
The public API is intertwine::fw. The exported CMake package and target are both named intertwine_cpp_framework.
| Area | Components |
|---|---|
| HTTP services | Application, Router, Context, MiddlewareChain |
| Client transport | ITransport, TransportFactory |
| File delivery | IFileTransfer, FileTransferFactory |
| Concurrency | SupervisedThreadPool, LockfreeQueue, SPSCQueue, FlowController |
| Utilities | Configuration, logging, JWT, password hashing, certificates, JSON, IDs, and time handling |
git clone --recursive https://github.com/AlkaidLab/intertwine-cpp-framework.git
cd intertwine-cpp-framework
./build.sh --testOn Windows:
git clone --recursive https://github.com/AlkaidLab/intertwine-cpp-framework.git
Set-Location intertwine-cpp-framework
.\build.ps1 -TestThe build scripts prepare vcpkg and libhv when required. To reuse a vcpkg checkout or choose an installation prefix:
./build.sh --vcpkg-root ../vcpkg
./build.sh --install-dir ./out/install#include <intertwine/fw/Application.hpp>
#include <intertwine/fw/Context.hpp>
#include <intertwine/fw/Router.hpp>
namespace fw = intertwine::fw;
int main() {
fw::Application app;
fw::Router router;
router.get("/hello", [](fw::Context& ctx) {
ctx.json(200, "{\"message\":\"hello\"}");
});
app.mount(router);
app.setPort(8080);
return app.start();
}After installing the framework, find and link intertwine_cpp_framework from your project:
find_package(intertwine_cpp_framework REQUIRED)
target_link_libraries(your_target PRIVATE intertwine_cpp_framework)If the installation prefix is outside CMake's default search paths, pass it while configuring your project:
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/framework-installgit submodule add \
https://github.com/AlkaidLab/intertwine-cpp-framework.git \
third_party/intertwine-cpp-framework
git submodule update --init --recursiveThe default Chinese documentation is available in ../doc/.
Dependencies are resolved by the vcpkg build flow. Tests use GTest.