Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 808 Bytes

File metadata and controls

28 lines (21 loc) · 808 Bytes

C++ to Python BRF v2 interoperability

This focused example generates the same schema for C++ and Python. The C++ consumer writes canonical BRF v2 bytes; the Python consumer reads and decodes those bytes through the installed Python runtime.

Build the C++ producer after installing Quarry:

cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/quarry/install
cmake --build build
./build/quarry_cpp_python_encode encoded.brf

Generate Python code into the same example build tree and run the decoder with the installed runtime:

quarry-schema-compiler --language python \
  --output-directory build/python schema.brd
PYTHONPATH=build/python python decode.py encoded.brf

Both generated backends use the canonical BRF v2 contract; no adapter or special wire handling is involved.