|
ublk-cpp v0.1
A ublk library for std::execution.
|
How to build and integrate ublk-cpp in your project.
You can add ublk-cpp to your project via Git submodule:
In your CMakeLists.txt:
Alternatively, you can add ublk-cpp with FetchContent:
Condy fetches and statically links liburing by default (CONDY_LINK_LIBURING=ON). To use the liburing installed on your system instead, configure with CONDY_LINK_LIBURING=OFF.
ublk-cpp requires condy with std::execution support. When the standard library provides it, condy detects it automatically. Otherwise enable a fetched backend with CONDY_LINK_STDEXEC=ON (stdexec) or CONDY_LINK_BEMAN=ON (beman/execution).
ublk-cpp provides CMake options to build tests, the ublkctl tool, examples, and the Doxygen documentation:
| Option | Description | Default |
|---|---|---|
| UBLKCPP_BUILD_TESTS | Build tests | OFF |
| UBLKCPP_BUILD_UBLKCTL | Build the ublkctl tool | OFF |
| UBLKCPP_BUILD_EXAMPLES | Build examples | OFF |
| UBLKCPP_BUILD_DOCS | Build Doxygen documentation | OFF |
| UBLKCPP_USE_URING_CMD128 | Use IORING_OP_URING_CMD128 for control commands | ON |
The examples are ublk block device daemons and need the ublk driver loaded:
ublkctl is a control tool for ublk devices. Run it with a subcommand:
See ublkctl --help for all supported subcommands and options.