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 blazerulesThe 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 libtoolYou 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 -jReplace CMAKE_TOOLCHAIN_FILE with the path to your own vcpkg checkout if it is not under $HOME/.vcpkg-clion.
Always build ReleaseUse
-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 -jPortable 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.
| Option | Default | Purpose |
|---|---|---|
BLAZERULES_ENABLE_ONNX | ON | Enables model_score rules and register_model() |
BLAZERULES_IO | ON | Builds blazerules_io connectors/decoders |
BLAZERULES_IO_KAFKA | ON | Kafka source/sink inside blazerules_io |
BLAZERULES_IO_AVRO | ON | Avro binary decoder |
BLAZERULES_IO_PROTOBUF | ON | Protobuf descriptor decoder |
BLAZERULES_DASHBOARD | ON | Local read-only dashboard executable |
BLAZERULES_AGENT | ON | Local multi-input log/HTTP/file agent |
BLAZERULES_NATIVE_TUNE | ON | Local -march=native style tuning |
BLAZERULES_X86_AVX2 | ON | Builds runtime-dispatched AVX2 kernels on x86_64 |
BLAZERULES_X86_AVX512 | ON | Builds optional AVX-512 kernels on x86_64 |
IO moduleThe Kafka, CDC, Arrow IPC, Avro, and Protobuf connectors live in a separate
blazerules_iomodule. 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 NinjaVerify 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)
PYOn 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.yamlExecutables: 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 unauthenticatedThe 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 -jContainers 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.