Cross-platform coroutine library in C++ .
| Linux+OSX(Clang+GCC) | Windows(VC+MinGW) | Coveralls | Dev branch |
|---|---|---|---|
| Build & Unit Test | AppVeyor build status | Coveralls coverage | |
| Compilers | linux-gcc-4.8 | MSVC 14(Visual Studio 2015) | |
| linux-gcc-10 | MSVC 15(Visual Studio 2017) | ||
| macos-apple-clang-9 | MSVC 16(Visual Studio 2019) | ||
| macos-apple-clang-12 | MinGW64-gcc |
Documents can be found at https://libcopp.atframe.work/doxygen/html/ .(Generated by sphinx and doxygen with docs/libcopp.doxyfile.in).
cotask::task::await into cotask::task::await_task
cotask::task<TCO_MACRO, TTASK_MACRO> with cotask::task<TCO_MACRO> , we don't allow to custom id allocator now.cotask::core::standard_int_id_allocator<uint64_t> with copp::util::uint64_id_allocator , we don't allow to custom id allocator now.ar, as, ld (llvm
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
PS> bootstrap-vcpkg.bootstrap
Linux:~/$ ./bootstrap-vcpkg.sh
PS> .\vcpkg install libcopp [--triplet x64-windows-static/x64-windows/x64-windows-static-md and etc...]
Linux:~/$ ./vcpkg install libcopp
See :ref:`using with cmake <usage-using with-cmake>` for cmake below.
git clone --single-branch --depth=1 -b master https://github.com/owt5008137/libcopp.git
mkdir libcopp/build && cd libcopp/build
# cmake <libcopp dir> [options...]
cmake .. -DPROJECT_ENABLE_UNITTEST=YES -DPROJECT_ENABLE_SAMPLE=YES
cmake --build . --config RelWithDebInfo # or make [options] when using Makefile
test/sample/benchmark [optional]
# Run test => Required: PROJECT_ENABLE_UNITTEST=YES
cmake --build . --config RelWithDebInfo --target run_test # or make run_test when using Makefile
# Run sample => Required: PROJECT_ENABLE_SAMPLE=YES
cmake --build . --config RelWithDebInfo --target run_sample # or make run_sample when using Makefile
# Run benchmark => Required: PROJECT_ENABLE_SAMPLE=YES
cmake --build . --config RelWithDebInfo --target benchmark # or make benchmark when using Makefile
cmake --build . --config RelWithDebInfo --target install # or make install when using Makefile
Then just include and link libcopp.*/libcotask.*, or see :ref:`using with cmake <usage-using with-cmake>` for cmake below.
Options can be cmake options. such as set compile toolchains, source directory or options of libcopp that control build actions. libcopp options are listed below: