Installation

Install the Python module from PyPI or build BlazeRules from source on macOS, Linux, Windows, or portable cloud targets.

BlazeRules can be installed from PyPI as a full-feature Python package or built from source with CMake and Ninja. This page covers pip install, source prerequisites, platform presets, every CMake option, and how to verify the result.

Install from PyPI

pip install blazerules

The release wheel is built full-feature. It contains the native blazerules extension, blazerules_io, ONNX model_score, Kafka/CDC/Arrow IPC/Avro/Protobuf/S3 IO, dashboard, agent, schema inference, decisions/scoring, windows, lookups, regex, CIDR, temporal, geo, vector similarity, and runtime-dispatched SIMD kernels. numpy and pyarrow are declared Python runtime dependencies and are installed by pip.

Prerequisites

On macOS arm64 — the reference machine — install the build tools with Homebrew:

brew install cmake ninja autoconf autoconf-archive automake libtool

You also need a C++20 compiler and a vcpkg checkout for dependencies. The Arrow evaluation path and the Arrow examples require pyarrow in your Python environment.

Standard source build

From the repository root, configure and build the core library, the blazerules Python module, and the smoke driver:

cmake -S . -B cmake-build-release \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE="$HOME/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake" \
  -G Ninja

cmake --build cmake-build-release --target blazerules_core blazerules blazerules_driver -j

Replace CMAKE_TOOLCHAIN_FILE with the path to your own vcpkg checkout if it is not under $HOME/.vcpkg-clion.

🚧

Always build Release

Use -DCMAKE_BUILD_TYPE=Release. The measured throughput characteristics described in the Performance Model assume an optimized Release build; Debug builds are dramatically slower.

Presets

CMake presets are included for common production shapes. Pick the one matching your target platform:

   cmake --preset macos-arm64-release
   cmake --build --preset macos-arm64-release -j

Portable Linux, Windows, and cloud builds do not compile generic code with global AVX flags. ISA-specific files are compiled separately and selected at runtime, so the same binary runs across a range of CPUs and picks the best available kernel.

CMake options

The following options control source-build features. Defaults are full-feature so a normal source build matches the PyPI release policy.

OptionDefaultPurpose
BLAZERULES_ENABLE_ONNXONEnables model_score rules and register_model()
BLAZERULES_IOONBuilds blazerules_io connectors/decoders
BLAZERULES_IO_KAFKAONKafka source/sink inside blazerules_io
BLAZERULES_IO_AVROONAvro binary decoder
BLAZERULES_IO_PROTOBUFONProtobuf descriptor decoder
BLAZERULES_DASHBOARDONLocal read-only dashboard executable
BLAZERULES_AGENTONLocal multi-input log/HTTP/file agent
BLAZERULES_NATIVE_TUNEONLocal -march=native style tuning
BLAZERULES_X86_AVX2ONBuilds runtime-dispatched AVX2 kernels on x86_64
BLAZERULES_X86_AVX512ONBuilds optional AVX-512 kernels on x86_64
📘

IO module

The Kafka, CDC, Arrow IPC, Avro, and Protobuf connectors live in a separate blazerules_io module. The full wheel and default source build include it; custom lean builds can still disable it with -DBLAZERULES_IO=OFF.

To build a local full-feature development tree:

cmake -S . -B cmake-build-release \
  -DCMAKE_BUILD_TYPE=Release \
  -DBLAZERULES_ENABLE_ONNX=ON \
  -DBLAZERULES_IO=ON \
  -DBLAZERULES_IO_KAFKA=ON \
  -DBLAZERULES_IO_AVRO=ON \
  -DBLAZERULES_IO_PROTOBUF=ON \
  -DBLAZERULES_IO_S3=ON \
  -DBLAZERULES_DASHBOARD=ON \
  -DBLAZERULES_AGENT=ON \
  -DBLAZERULES_NATIVE_TUNE=ON \
  -DBLAZERULES_X86_AVX2=ON \
  -DBLAZERULES_X86_AVX512=ON \
  -G Ninja

Verify the build

Point Python at the build directory and confirm the module loads, reports its version, and reports the SIMD backend selected for your CPU:

export PYTHONPATH="$PWD/cmake-build-release"
python - <<'PY'
import blazerules
import blazerules_io
print("version:", blazerules.__version__)
print("simd backend:", blazerules.simd_backend())
print("cpu features:", blazerules.cpu_features_summary())
print("io kafka:", blazerules_io.has_kafka)
PY

On the Apple M1 reference machine the version is 0.1.0 and the SIMD backend is neon. On x86_64 the backend is typically avx2 or scalar. The YAML compatibility level is available as blazerules.RULE_YAML_COMPATIBILITY and tracks the 2.x rule format.

You can also smoke-test against the sample rules:

./cmake-build-release/blazerules_driver rules.yaml

Executables: dashboard and agent

Two command-line executables ship with the full-feature build.

The dashboard is a local, read-only UI:

cmake --build cmake-build-release --target blazerules_dashboard -j
./cmake-build-release/blazerules_dashboard --host 127.0.0.1 --port 9470 --rules rules.yaml

The dashboard is unauthenticated

The dashboard is read-only and has no authentication. Bind it to 127.0.0.1 (localhost) unless you add your own network access controls.

The agent is a local multi-input ingest process (HTTP, file-tail, stdin) driven by a top-level instances: block in the rule file:

cmake --build cmake-build-release --target blazerules_agent -j

Containers and Kubernetes

The repository includes an optional Helm chart under charts/.

The repository does not ship a Dockerfile. Build your own image containing blazerules_agent and/or blazerules_dashboard, then point the chart's image.repository and image.tag values at that image. See Deployment.

Where to go next