An async first framework leveraging powerful features of C++23 built for scale, speed, and ease.
NOTE: This codebase is recommended to run on C++ 23 since most of the features are geared to it. If its possible try to get your compiler to compile with experimental libraries enabled (which will enable all the features the compiler may not have implemented for C++ 23).
The following compilers (and anything newer) are supported: GCC 13, MSVC 2022, Clang 17
- Asynchronous Runtime, Supporting Yielding and working with timeouts that are not thread based
- Basic networking API (Sockets, Server Sockets, async read & write) via I/O streams
- Web API and WebApplication wrapper (everything before was mostly console or cmdline based)
- Raw request/response handling with streams vs composable stream adaptor based handling (both are supported by nature)
- TLS support for server and client side
Features 1 & 2 are supported in version 0.5. The features 3 & 4 will be available in v1. TLS may arrive in v2.
- Make a fork of the repository
- Make sure your environment is set up (I use VS Code + Microsoft's C++ Extension Pack & CMake extensions). Ensure that a C++ compiler exists on your computer and is added to the PATH as well as cmake.
- Check out to a new branch and give it a good name
- Ensure
vcpkg
is setup. Ifvcpkg
is empty then run this:git submodule update --init --recursive
. Then entervcpkg
and runbootstrap-vcpkg.bat
on Windows orboostrap-vcpkg.sh
on Linux or MacOS. - Configure your project (If VS Code is setup with CMake then it should be automatically done for you. Otherwise, run
cmake --preset linux-build
if on Linux,cmake --preset windows-build
if on Windows,cmake --preset macos-build
on MacOS. - Build the library:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
&&cmake --build build --config Debug
- Run the tests
ctest --test-dir build --output-on-failure --verbose
. To test a specific test, runctest --test-dir build --output-on-failure --verbose -R "<<test regex>>"
- Develop! Your environment is set up. Add your changes, perform steps 6 & 7 to make sure that your changes don't break anything.
- Once everything is properly checked. Push your changes to your fork and make a PR. Optionally: Get Copilot to review your changes before you get @adityarao2005 (me) to review it.
- If everything checks out with your code on all platforms on the CI runner, then I'll merge the PR, and you'll have contributed to WebCraft. Otherwise, I'll mention specific comments and will require you to revise your work before requesting my review again and running another build.
To see what issues exist, check out the issues tab or checkout this link to see what I'm working on: https://github.com/users/adityarao2005/projects/4. If you plan on working on an issue, add a comment saying that you're working on it.
TBD. Currently, WebCraft does not have a port for vcpkg. If one of the contributors can add this library to vcpkg, that would be great (Here's how to do it. I think it should be intuitive enough: https://learn.microsoft.com/en-gb/vcpkg/get_started/get-started-packaging?pivots=shell-bash)!