Building with and without the venue¶
The venue is an optional module. If you only write strategies, backtests, or connectors, you never pay for it.
The flag¶
# with the venue (default)
cmake -S . -B build
cmake --build build
# without it — nothing venue-related is configured, compiled, or tested
cmake -S . -B build -DFLOX_BUILD_VENUE=OFF
cmake --build build
FLOX_BUILD_VENUE follows the repository's FLOX_BUILD_* convention (the flags
that gate optional build outputs; FLOX_ENABLE_* gates capabilities of the core
library). Turning it off removes:
- the
flox-venuelibrary target and its headers from the build, - every venue test from
ctest, multi_agent_venue_demofrom the demo targets.
CI builds the OFF configuration on every run and checks that the full test
suite still passes with no venue code compiled.
Platform support¶
Linux and macOS. The module is skipped on MSVC and clang-cl: the ledger keeps
money in __int128, and those compilers have no 128-bit integer type. A
Windows build configures with the module off and prints a status message.
Dependencies¶
The venue links only ${FLOX} core. OpenSSL is needed by the TLS gateway
alone; it is detected inside venue/CMakeLists.txt, and without it the module
still builds, skipping only the TLS gateway test.
Consuming it¶
That brings the include prefix with it:
#include "flox-venue/matching_engine.h" // module
#include "flox/book/matching_book.h" // core (order-level books live in core)
Layout¶
venue/
CMakeLists.txt target flox::venue, gated by FLOX_BUILD_VENUE
include/flox-venue/ public headers, namespace flox::venue
src/ the few non-header translation units
tests/ the verification corpus (registered into FLOX ctest)
scripts/ sanitizer gate
benchmarks/ book microbenchmark
Order-level books (flox/book/{resting_order,matching_book,ladder_book}.h) and
the shared utilities the venue needed (flox/util/{crypto,wire,transport,
websocket,system_clock}.h) live in core, because they are useful on their own
and carry no venue-specific policy.