NOTE: This project uses an experimental feature from jbpf. It is not meant to be used in production environments.
This repository is a extension for jbpf demonstrating how to utilize protobuf serialization as part of jbpf.
Prerequisites:
- C compiler
- Go v1.23.2+
- Make
- Pip
- Python3
- Protocol Buffer Compiler (protoc)
The project utilizes Nanopb to generate C structures for given protobuf specs that use contiguous memory. It also generates serializer libraries that can be provided to jbpf, to encode output and decode input data to seamlessly integrate external data processing systems.
# init submodules:
./init_submodules.sh
# Install nanopb pip packages:
python3 -m pip install -r 3p/nanopb/requirements.txt
# source environment variables
source ./setup_jbpfp_env.sh
# build jbpf_protobuf_cli
make -C pkg
Alternatively, build using a container:
# init submodules:
./init_submodules.sh
docker build -t jbpf_protobuf_builder:latest -f deploy/Dockerfile .
In order to run any of the samples, you'll need to build jbpf.
mkdir -p jbpf/build
cd jbpf/build
cmake .. -DJBPF_EXPERIMENTAL_FEATURES=on
make -j
cd ../..
Then follow these steps to run a simple example.
The jbpf framework is licensed under the MIT license.