Develop the C++ workspace consumer
workspace consumer 0.1.0-alpha.10 · Source
Try the workspace consumer from the libtmux C++ source checkout. It is built as a repository target, so installing the core package alone does not provide its headers or YAML reader.
Build the consumerLink to section
Use the repository’s prepared development toolchain and install tmux. From the checkout root, configure the development preset:
$ cmake --preset cxx-devBuild the workspace test executable:
$ cmake --build --preset cxx-dev --target workspace_builder_testRun the consumer tests against their isolated tmux fixtures:
$ ctest --preset cxx-dev -R consumer.workspace --output-on-failureThe tests exercise both YAML parsing and typed configuration. The example shows the session shape used by the builder test.
Use it in an applicationLink to section
The workspace_builder CMake target provides the consumer include directory,
links the core libtmux::libtmux target publicly, and keeps yaml-cpp private
to the YAML reader. If you adapt the consumer, preserve those dependency
boundaries and include the parser implementation when using parse_tmuxp.
Parse first and inspect ParseError before contacting tmux. Start the target
tmux server before opening its core handle, as the test fixture does. Pass a core
Server and the parsed description to build. Check the returned expected
value before reading its session; after failure, inspect the target server
because earlier operations may remain.
There is no separate installed workspace product in this source tree. Do not
expect core package managers to expose libtmux_consumers/workspace.hpp.