Unda is a modular C++20 library built around Asio. It provides a shared execution layer, coroutine synchronization, HTTP/1.x, WebSocket, and application utilities without requiring applications to adopt every module.
unda.core
└── unda.coro
├── unda.http
│ └── unda.websocket
└── unda.utils
| Module | Build switch | Default | Primary include | Source-tree target |
|---|---|---|---|---|
| Core | always built | ON | <unda/core.h> |
unda.core |
| Coroutines | UNDA_BUILD_CORO |
ON | <unda/coro.h> |
unda.coro |
| HTTP | UNDA_BUILD_HTTP |
OFF | <unda/http.h> |
unda.http |
| WebSocket | UNDA_BUILD_WEBSOCKET |
OFF | <unda/websocket.h> |
unda.websocket |
| Utilities | UNDA_BUILD_UTILITIES |
OFF | <unda/utils.h> |
unda.utils |
Link each module your application uses directly. CMake propagates that
module's lower-level dependencies. <unda.h> includes the umbrella header for
every module enabled when Unda was configured.
Requirements: CMake 3.15+, C++20, and GCC 13+, Clang 17+, or MSVC 19.30+ (Visual Studio 2022+).
The default build contains Core and Coroutines:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallelEnable optional modules explicitly. The following profile builds the complete library and all applicable examples:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DUNDA_BUILD_HTTP=ON \
-DUNDA_BUILD_WEBSOCKET=ON \
-DUNDA_BUILD_UTILITIES=ON \
-DUNDA_BUILD_EXAMPLES=ON
cmake --build build --parallelSee Build and configuration for feature switches, dependency providers, installation, and CMake consumption.
| Topic | English | 简体中文 |
|---|---|---|
| Documentation index | Open | 打开 |
| Project structure | Open | 打开 |
| Build and integration | Open | 打开 |
| Execution and I/O model | Open | 打开 |
Runnable programs are catalogued in Examples. Verification profiles and test selection are documented in Tests.
| Path | Role |
|---|---|
unda/ and unda.h |
Library headers and implementations, arranged by module |
cmake/ |
Build policies, feature selection, and package export |
3rd_party/ |
Bundled Asio and spdlog providers |
examples/ |
Small programs grouped by the module they exercise |
test/ |
Functional, CMake, stress, fuzz, and performance suites |
doc/ |
English and Simplified Chinese guides |
The headers are the API authority. Guides describe supported entry points, workflows, ownership, and concurrency constraints; examples show concrete usage; tests define verified behavior.
Unda is licensed under the MIT License. Bundled dependencies retain their own licenses.