Skip to content

Commit 6f5ef71

Browse files
committed
feat: coroutine types
1 parent 07ac63d commit 6f5ef71

39 files changed

+764
-351
lines changed

.cursorignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/bin
2+
/bin64
3+
4+
/__build__
5+
/toolchain.cmake
6+
7+
# Emacs
8+
*#
9+
10+
# Vim
11+
*~
12+
13+
# Visual Studio
14+
/.vs
15+
/out
16+
17+
# Visual Studio Code
18+
/.vscode
19+
CMakeUserPresets.json
20+
21+
# clangd
22+
/.cache
23+
/.clangd
24+
/compile_commands.json
25+
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)

.github/workflows/ci-failure-auto-fix.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

.github/workflows/claude.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

example/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010

1111
add_subdirectory(client)
1212
add_subdirectory(server)
13+
add_subdirectory(cpp20)

example/Jamfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010

1111
build-project client ;
1212
build-project server ;
13+
build-project cpp20 ;

example/client/burl/CMakeLists.txt

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,47 @@
77
# Official repository: https://github.com/cppalliance/beast2
88
#
99

10-
if (CMAKE_CXX_STANDARD EQUAL 20)
11-
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp
12-
CMakeLists.txt
13-
Jamfile)
10+
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp
11+
CMakeLists.txt
12+
Jamfile)
1413

15-
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES})
14+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES})
1615

17-
add_executable(beast2_example_client_burl ${PFILES})
16+
add_executable(beast2_example_client_burl ${PFILES})
1817

19-
target_compile_definitions(beast2_example_client_burl
20-
PRIVATE BOOST_ASIO_NO_DEPRECATED)
18+
target_compile_definitions(beast2_example_client_burl
19+
PRIVATE BOOST_ASIO_NO_DEPRECATED)
2120

22-
set_property(TARGET beast2_example_client_burl
23-
PROPERTY FOLDER "examples")
21+
set_property(TARGET beast2_example_client_burl
22+
PROPERTY FOLDER "examples")
2423

25-
find_package(OpenSSL REQUIRED)
24+
find_package(OpenSSL REQUIRED)
2625

27-
target_link_libraries(beast2_example_client_burl
28-
Boost::beast2
29-
Boost::url
30-
Boost::program_options
31-
Boost::scope
32-
OpenSSL::SSL
33-
OpenSSL::Crypto)
26+
target_compile_features(beast2_example_client_burl PUBLIC cxx_std_20)
3427

35-
if (WIN32)
36-
target_link_libraries(beast2_example_client_burl crypt32)
37-
endif()
28+
target_link_libraries(beast2_example_client_burl
29+
Boost::beast2
30+
Boost::url
31+
Boost::program_options
32+
Boost::scope
33+
OpenSSL::SSL
34+
OpenSSL::Crypto)
3835

39-
if (TARGET Boost::capy_zlib)
40-
target_link_libraries(beast2_example_client_burl Boost::capy_zlib)
41-
endif()
42-
43-
if (TARGET Boost::capy_brotli)
44-
target_link_libraries(beast2_example_client_burl Boost::capy_brotli)
45-
endif()
36+
if (WIN32)
37+
target_link_libraries(beast2_example_client_burl crypt32)
38+
endif()
4639

47-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
48-
find_package(Libpsl)
49-
if (Libpsl_FOUND)
50-
target_link_libraries(beast2_example_client_burl Libpsl::Libpsl)
51-
target_compile_definitions(beast2_example_client_burl PRIVATE BURL_HAS_LIBPSL)
52-
endif ()
40+
if (TARGET Boost::capy_zlib)
41+
target_link_libraries(beast2_example_client_burl Boost::capy_zlib)
42+
endif()
5343

44+
if (TARGET Boost::capy_brotli)
45+
target_link_libraries(beast2_example_client_burl Boost::capy_brotli)
5446
endif()
47+
48+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
49+
find_package(Libpsl)
50+
if (Libpsl_FOUND)
51+
target_link_libraries(beast2_example_client_burl Libpsl::Libpsl)
52+
target_compile_definitions(beast2_example_client_burl PRIVATE BURL_HAS_LIBPSL)
53+
endif ()

example/client/jsonrpc/CMakeLists.txt

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@ if (TARGET Boost::capy_brotli)
5252
endif()
5353

5454
# CPP20 Example
55-
if (CMAKE_CXX_STANDARD EQUAL 20)
56-
add_executable(beast2_example_client_jsonrpc_cpp20 cpp20.cpp eth_methods.hpp Jamfile)
57-
set_property(TARGET beast2_example_client_jsonrpc_cpp20
58-
PROPERTY FOLDER "examples")
59-
target_link_libraries(beast2_example_client_jsonrpc_cpp20
60-
PRIVATE
61-
beast2_example_client_jsonrpc_lib)
62-
if (TARGET Boost::capy_zlib)
63-
target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE Boost::capy_zlib)
64-
endif()
65-
if (TARGET Boost::capy_brotli)
66-
target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE Boost::capy_brotli)
67-
endif()
68-
endif ()
55+
add_executable(beast2_example_client_jsonrpc_cpp20 cpp20.cpp eth_methods.hpp Jamfile)
56+
set_property(TARGET beast2_example_client_jsonrpc_cpp20
57+
PROPERTY FOLDER "examples")
58+
target_compile_features(beast2_example_client_jsonrpc_cpp20 PUBLIC cxx_std_20)
59+
target_link_libraries(beast2_example_client_jsonrpc_cpp20
60+
PRIVATE
61+
beast2_example_client_jsonrpc_lib)
62+
if (TARGET Boost::capy_zlib)
63+
target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE Boost::capy_zlib)
64+
endif()
65+
if (TARGET Boost::capy_brotli)
66+
target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE Boost::capy_brotli)
67+
endif()

example/cpp20/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com)
3+
#
4+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
#
7+
# Official repository: https://github.com/cppalliance/beast2
8+
#
9+
10+
add_subdirectory(co_spawn)

example/cpp20/Jamfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com)
3+
#
4+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
#
7+
# Official repository: https://github.com/cppalliance/beast2
8+
#
9+
10+
build-project co_spawn ;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Copyright (c) 2025 Mohammad Nejati
3+
#
4+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
#
7+
# Official repository: https://github.com/cppalliance/beast2
8+
#
9+
10+
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp
11+
CMakeLists.txt
12+
Jamfile)
13+
14+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES})
15+
16+
add_executable(beast2_example_co_spawn ${PFILES})
17+
18+
target_compile_definitions(beast2_example_co_spawn
19+
PRIVATE BOOST_ASIO_NO_DEPRECATED)
20+
21+
set_property(TARGET beast2_example_co_spawn
22+
PROPERTY FOLDER "examples")
23+
24+
find_package(OpenSSL REQUIRED)
25+
26+
target_compile_features(beast2_example_co_spawn PUBLIC cxx_std_20)
27+
28+
target_link_libraries(beast2_example_co_spawn
29+
Boost::beast2)

0 commit comments

Comments
 (0)