LibGS is a modular C++20 library built on standalone Asio. It provides a shared execution runtime, coroutine synchronization, HTTP/1.x, WebSocket, and application utilities.
| Module | Target | Default | Depends on |
|---|---|---|---|
| Core | gs.core |
ON | — |
| Coroutines | gs.coro |
ON | Core |
| HTTP | gs.http |
OFF | Coroutines |
| WebSocket | gs.websocket |
OFF | HTTP |
| Utilities | gs.utils |
OFF | Coroutines |
Each module has an umbrella header under libgs/. <libgs.h> includes every
module enabled in the build configuration.
Requirements: CMake 3.15+, C++20, and GCC 13+, Clang 17+, or MSVC 19.30+ (Visual Studio 2022+).
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallelThe default configuration builds Core and Coroutines. Enable optional modules explicitly:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DLIBGS_BUILD_HTTP=ON \
-DLIBGS_BUILD_WEBSOCKET=ON \
-DLIBGS_BUILD_UTILITIES=ON \
-DLIBGS_BUILD_EXAMPLES=ON
cmake --build build --parallelFor module switches, optional dependencies, installation, and consumption, see Build and configuration.
| Path | Contents |
|---|---|
libgs/ |
Public headers and module implementations |
examples/ |
Buildable examples grouped by module |
test/ |
Functional, stress, fuzz, and performance tests |
doc/en/ |
English guides |
doc/zh_CN/ |
简体中文指南 |
3rd_party/ |
Bundled dependencies and their sources |
Public declarations under libgs/ are the API reference. The guides explain
module selection, usage patterns, ownership, and concurrency constraints.
LibGS is licensed under the MIT License. Bundled dependencies retain their own licenses.