You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- jsoncons now used for JSON & Msgpack serializations.
- Added CBOR serialization support.
- Serialization encoder/decoders are now reused by Session.
- Don't output warnings by default.
- Wrapped long lines in README.
- String variants are now output as quoted/escaped JSON.
- Fix "Invocation is empty" in coroutine unpackers.
- Renamed CodecBuffer to MessageBuffer
- Revised Codec type requirements.
- Simplified Transport type requirement.
- Removed TransportBuffer requirement
- Added toString free function for Variant, Array, and Object
- Adopt the [jsoncons](https://github.com/danielaparker/jsoncons) library's cursor interface to implement the `wamp::Json` and `wamp::Msgpack` codecs, while retaining `wamp::Variant` as the document type.
73
75
- Make `wamp::Session` more thread-safe.
74
-
- Remove `wamp::CoroSession` and make it so that `wamp::Session` can accept any completion token (`yield`, `use_future`, etc) supported by Boost.Asio.
76
+
- Remove `wamp::CoroSession` and make it so that `wamp::Session` can accept any
77
+
completion token (`yield`, `use_future`, etc) supported by Boost.Asio.
75
78
76
79
### v1.1
77
80
@@ -83,7 +86,9 @@ Roadmap
83
86
84
87
### v2.0 (maybe)
85
88
86
-
- Migrate from jsoncons to another serialization library currently in development, which features the ability to skip an intermediary variant type and directly encode/decode the network data into C++ data types.
89
+
- Migrate from jsoncons to another serialization library currently in
90
+
development, which features the ability to skip an intermediary variant type
91
+
and directly encode/decode the network data into C++ data types.
87
92
88
93
89
94
Questions, Discussions, and Issues
@@ -102,7 +107,9 @@ For reporting bugs or for suggesting enhancements, please use the GitHub
102
107
Usage Examples Using Coroutines
103
108
---------------------------------
104
109
105
-
_For a more comprehensive overview, check out the [Tutorials](https://ecorm.github.io/cppwamp/_tutorial.html) in the wiki._
110
+
_For a more comprehensive overview, check out the
111
+
[Tutorials](https://ecorm.github.io/cppwamp/_tutorial.html) in the
CppWAMP supports header-only usage. You may simply add the include directories of CppWAMP and its dependencies into your project's include search path. On GCC/Clang, this can be done with the `-isystem` compiler flag. You'll also need to link to the necessary Boost libraries.
348
+
CppWAMP supports header-only usage. You may simply add the include directories
349
+
of CppWAMP and its dependencies into your project's include search path. On
350
+
GCC/Clang, this can be done with the `-isystem` compiler flag. You'll also need
351
+
to link to the necessary Boost libraries.
342
352
343
-
You may use CppWAMP's CMake scripts to fetch and build dependencies. The following commands will clone the CppWAMP repository, build the third-party dependencies, and install the headers and CMake package config:
353
+
You may use CppWAMP's CMake scripts to fetch and build dependencies. The
354
+
following commands will clone the CppWAMP repository, build the third-party
355
+
dependencies, and install the headers and CMake package config:
Note that that only `-lboost_system` is necessary if you're not using the coroutine API.
384
+
Note that only `-lboost_system` is necessary if you're not using the
385
+
coroutine API.
373
386
374
-
You may omit the `-DCPPWAMP_OPT_VENDORIZE` option if you want to use the third-party libraries installed on your system. You may provide hints to their location via the following CMake configuration options:
387
+
You may omit the `-DCPPWAMP_OPT_VENDORIZE` option if you want to use the
388
+
third-party libraries installed on your system. You may provide hints to their
389
+
location via the following CMake configuration options:
375
390
376
391
-`-DBoost_ROOT=path/to/boost`
377
-
-`-DRapidJSON_ROOT=path/to/rapidjson`
378
-
-`-DMsgpack_ROOT=path/to/msgpack`
392
+
-`-Djsoncons_ROOT=path/to/jsoncons`
379
393
380
394
381
395
Compiling the library, tests, and examples
382
396
------------------------------------------
383
397
384
-
The steps are similar to the above _Header-Only Installation_, except that the `-DCPPWAMP_OPT_HEADERS_ONLY` option is omitted.
398
+
The steps are similar to the above _Header-Only Installation_, except that
399
+
the `-DCPPWAMP_OPT_HEADERS_ONLY` option is omitted.
The necessary compiler flags to use in your project are the same as the above _Header-Only Installation_, with the following extra needed linker flags:
409
+
The necessary compiler flags to use in your project are the same as the above
410
+
_Header-Only Installation_, with the following extra needed linker flags:
395
411
396
412
```
397
413
-L path/to/cppwamp/_stage/cppwamp/lib
398
-
-lcppwamp-json
399
-
-lcppwamp-msgpack
400
414
-lcppwamp-core
401
415
```
402
416
403
-
where `-lcppwamp-json` or `-lcppwamp-msgpack` may be omitted if your project doesn't use that particular serialization.
417
+
Consult the root CMakeLists.txt file for a list of `CPPWAMP_OPT_<option>` cache
418
+
variables that control what's included in the build.
404
419
405
-
Consult the root CMakeLists.txt file for a list of `CPPWAMP_OPT_<option>` cache variables that control what's included in the build.
406
420
407
421
Integrating CppWAMP into a CMake-based Project
408
422
----------------------------------------------
409
423
410
424
### With add_subdirectory
411
425
412
-
The following example CMakeLists.txt shows how to include CppWAMP via `add_subdirectory`:
426
+
The following example CMakeLists.txt shows how to include CppWAMP via
option(CPPWAMP_OPT_WITH_MSGPACK "" OFF) # Only JSON is needed for
423
-
# this example
424
437
# If the following are not set, CppWAMP will use the default
425
438
# search paths of CMake's find_package() to find its dependencies.
426
439
set(Boost_ROOT /path/to/boost)
427
-
set(Msgpack_ROOT /path/to/msgpack)
440
+
set(jsoncons_ROOT /path/to/jsoncons)
428
441
endif()
429
442
430
443
add_subdirectory(cppwamp)
431
444
add_executable(myapp main.cpp)
432
445
target_link_libraries(myapp
433
-
PRIVATE CppWAMP::json CppWAMP::coro-headers)
446
+
PRIVATE CppWAMP::coro-headers)
434
447
```
435
448
436
-
Any of the `CppWAMP::*` targets will automatically add the basic usage requirements of CppWAMP into your app's generated compiler/linker flags. The `CppWAMP::json` target, for example, will add the `libcppwamp-json` library, as well as the RapidJSON include search path.
449
+
Any of the `CppWAMP::*` targets will automatically add the basic usage
450
+
requirements of CppWAMP into your app's generated compiler/linker flags.
437
451
438
-
Please consult CppWAMP's root CMakeLists.txt file for a complete list of targets that you may specify for your app's `target_link_libraries`.
452
+
Please consult CppWAMP's root CMakeLists.txt file for a complete list of
453
+
targets that you may specify for your app's `target_link_libraries`.
439
454
440
455
### With FetchContent
441
456
442
-
You can use CMake's FetchContent to download CppWAMP and its dependencies at configuration time from within your project's CMakeLists.txt, as shown in the following example.
457
+
You can use CMake's FetchContent to download CppWAMP and its dependencies at
458
+
configuration time from within your project's CMakeLists.txt, as shown in the
If you do not wish to embed CppWAMP as a subdirectory of your project, you may use `find_package` instead:
490
+
If you do not wish to embed CppWAMP as a subdirectory of your project, you may
491
+
use `find_package` instead:
476
492
477
493
```cmake
478
494
cmake_minimum_required (VERSION 3.12)
@@ -481,21 +497,24 @@ project(MyApp)
481
497
# If the following are not set, CppWAMP will use the default
482
498
# search paths of CMake's find_package() to find its dependencies.
483
499
set(Boost_ROOT /path/to/boost)
484
-
set(RapidJSON_ROOT /path/to/rapidjson)
485
-
set(Msgpack_ROOT /path/to/msgpack)
500
+
set(jsoncons_ROOT /path/to/jsoncons)
486
501
487
502
find_package(CppWAMP
488
-
REQUIRED coro-headers json
503
+
REQUIRED coro-headers
489
504
CONFIG
490
505
PATHS /path/to/cppwamp_installation
491
506
NO_DEFAULT_PATH)
492
507
493
508
add_executable(myapp main.cpp)
494
509
target_link_libraries(myapp
495
-
PRIVATE CppWAMP::json CppWAMP::coro-headers)
510
+
PRIVATE CppWAMP::coro-headers)
496
511
```
497
512
498
-
This method requires that CppWAMP be previously built (either as header-only, or compiled) and installed so that its CMake package config (i.e. `CppWAMPConfig.cmake`) is generated. This can either be done outside of your project or via your project's CMake scripts (for example by using `ExternalProject_add` or `FetchContent`).
513
+
This method requires that CppWAMP be previously built (either as header-only,
514
+
or compiled) and installed so that its CMake package config
515
+
(i.e. `CppWAMPConfig.cmake`) is generated. This can either be done outside of
516
+
your project or via your project's CMake scripts (for example by using
0 commit comments