blazerules 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blazerules-0.1.0/.gitignore +97 -0
- blazerules-0.1.0/CMakeLists.txt +296 -0
- blazerules-0.1.0/CMakePresets.json +281 -0
- blazerules-0.1.0/LICENSE +201 -0
- blazerules-0.1.0/PKG-INFO +786 -0
- blazerules-0.1.0/README.md +559 -0
- blazerules-0.1.0/assets/dashboard-overview.png +0 -0
- blazerules-0.1.0/assets/dashboard-overview.svg +78 -0
- blazerules-0.1.0/ci/setup_vcpkg.py +40 -0
- blazerules-0.1.0/include/blazerules/arena.h +53 -0
- blazerules-0.1.0/include/blazerules/arrow_util.h +51 -0
- blazerules-0.1.0/include/blazerules/ast.h +74 -0
- blazerules-0.1.0/include/blazerules/batch_result.h +143 -0
- blazerules-0.1.0/include/blazerules/bitmask.h +121 -0
- blazerules-0.1.0/include/blazerules/compiler.h +10 -0
- blazerules-0.1.0/include/blazerules/conflict.h +39 -0
- blazerules-0.1.0/include/blazerules/dict_encoder.h +42 -0
- blazerules-0.1.0/include/blazerules/dsl_parser.h +10 -0
- blazerules-0.1.0/include/blazerules/engine.h +336 -0
- blazerules-0.1.0/include/blazerules/kernel_sequence.h +345 -0
- blazerules-0.1.0/include/blazerules/mmap_reader.h +34 -0
- blazerules-0.1.0/include/blazerules/model_registry.h +34 -0
- blazerules-0.1.0/include/blazerules/orchestrator.h +35 -0
- blazerules-0.1.0/include/blazerules/resource_resolver.h +30 -0
- blazerules-0.1.0/include/blazerules/result.h +188 -0
- blazerules-0.1.0/include/blazerules/rule_spec.h +319 -0
- blazerules-0.1.0/include/blazerules/schema.h +100 -0
- blazerules-0.1.0/include/blazerules/schema_inference.h +36 -0
- blazerules-0.1.0/include/blazerules/simd_kernels.h +72 -0
- blazerules-0.1.0/include/blazerules/simd_vec.h +30 -0
- blazerules-0.1.0/include/blazerules/sql_expr_parser.h +16 -0
- blazerules-0.1.0/include/blazerules/transposer.h +118 -0
- blazerules-0.1.0/include/blazerules/vector_channels.h +18 -0
- blazerules-0.1.0/include/blazerules/version.h +11 -0
- blazerules-0.1.0/include/blazerules/window_store.h +82 -0
- blazerules-0.1.0/include/blazerules_io/cdc.h +15 -0
- blazerules-0.1.0/include/blazerules_io/decoder.h +66 -0
- blazerules-0.1.0/include/blazerules_io/file_reader.h +31 -0
- blazerules-0.1.0/include/blazerules_io/kafka.h +63 -0
- blazerules-0.1.0/include/blazerules_io/stream_runtime.h +44 -0
- blazerules-0.1.0/ports/flatbuffers/fix-runtime-flags-msvc.patch +19 -0
- blazerules-0.1.0/ports/flatbuffers/fix-uwp-build.patch +20 -0
- blazerules-0.1.0/ports/flatbuffers/portfile.cmake +57 -0
- blazerules-0.1.0/ports/flatbuffers/vcpkg.json +21 -0
- blazerules-0.1.0/pyproject.toml +79 -0
- blazerules-0.1.0/src/agent/main.cpp +531 -0
- blazerules-0.1.0/src/bindings/pybind_io_module.cpp +379 -0
- blazerules-0.1.0/src/bindings/pybind_module.cpp +912 -0
- blazerules-0.1.0/src/compiler/compiler.cpp +1313 -0
- blazerules-0.1.0/src/compiler/conflict.cpp +175 -0
- blazerules-0.1.0/src/compiler/dsl_parser.cpp +707 -0
- blazerules-0.1.0/src/compiler/schema.cpp +58 -0
- blazerules-0.1.0/src/compiler/sql_expr_parser.cpp +434 -0
- blazerules-0.1.0/src/core/dict_encoder.cpp +156 -0
- blazerules-0.1.0/src/core/engine.cpp +1889 -0
- blazerules-0.1.0/src/core/kernels.cpp +893 -0
- blazerules-0.1.0/src/core/kernels_avx2.cpp +422 -0
- blazerules-0.1.0/src/core/kernels_avx512.cpp +249 -0
- blazerules-0.1.0/src/core/mmap_reader.cpp +74 -0
- blazerules-0.1.0/src/core/model_registry.cpp +206 -0
- blazerules-0.1.0/src/core/orchestrator.cpp +1518 -0
- blazerules-0.1.0/src/core/resource_resolver.cpp +257 -0
- blazerules-0.1.0/src/core/schema_inference.cpp +614 -0
- blazerules-0.1.0/src/core/transposer.cpp +1501 -0
- blazerules-0.1.0/src/core/vector_channels.cpp +91 -0
- blazerules-0.1.0/src/core/window_store.cpp +404 -0
- blazerules-0.1.0/src/dashboard/main.cpp +1703 -0
- blazerules-0.1.0/src/driver/main.cpp +113 -0
- blazerules-0.1.0/src/io/cdc.cpp +75 -0
- blazerules-0.1.0/src/io/decoders/arrow_ipc.cpp +116 -0
- blazerules-0.1.0/src/io/decoders/avro.cpp +286 -0
- blazerules-0.1.0/src/io/decoders/common.cpp +53 -0
- blazerules-0.1.0/src/io/decoders/protobuf.cpp +465 -0
- blazerules-0.1.0/src/io/file_reader.cpp +190 -0
- blazerules-0.1.0/src/io/kafka.cpp +129 -0
- blazerules-0.1.0/src/io/stream_runtime.cpp +195 -0
- blazerules-0.1.0/triplets/arm64-osx.cmake +5 -0
- blazerules-0.1.0/triplets/x64-linux.cmake +5 -0
- blazerules-0.1.0/vcpkg.json +35 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
*.d
|
|
2
|
+
|
|
3
|
+
*.slo
|
|
4
|
+
*.lo
|
|
5
|
+
*.o
|
|
6
|
+
*.obj
|
|
7
|
+
|
|
8
|
+
*.gch
|
|
9
|
+
*.pch
|
|
10
|
+
|
|
11
|
+
*.ilk
|
|
12
|
+
|
|
13
|
+
*.pdb
|
|
14
|
+
|
|
15
|
+
*.so
|
|
16
|
+
*.dylib
|
|
17
|
+
*.dll
|
|
18
|
+
*.so.*
|
|
19
|
+
|
|
20
|
+
*.mod
|
|
21
|
+
*.smod
|
|
22
|
+
|
|
23
|
+
*.lai
|
|
24
|
+
*.la
|
|
25
|
+
*.a
|
|
26
|
+
*.lib
|
|
27
|
+
|
|
28
|
+
*.exe
|
|
29
|
+
*.out
|
|
30
|
+
*.app
|
|
31
|
+
|
|
32
|
+
build/
|
|
33
|
+
Build/
|
|
34
|
+
build-*/
|
|
35
|
+
cmake-build-*/
|
|
36
|
+
dist/
|
|
37
|
+
wheelhouse/
|
|
38
|
+
|
|
39
|
+
CMakeFiles/
|
|
40
|
+
CMakeCache.txt
|
|
41
|
+
cmake_install.cmake
|
|
42
|
+
Makefile
|
|
43
|
+
install_manifest.txt
|
|
44
|
+
compile_commands.json
|
|
45
|
+
|
|
46
|
+
*.tmp
|
|
47
|
+
*.log
|
|
48
|
+
*.bak
|
|
49
|
+
*.swp
|
|
50
|
+
|
|
51
|
+
vcpkg_installed/
|
|
52
|
+
|
|
53
|
+
*.dwo
|
|
54
|
+
|
|
55
|
+
Testing/
|
|
56
|
+
.cache/
|
|
57
|
+
.pytest_cache/
|
|
58
|
+
.mypy_cache/
|
|
59
|
+
.ruff_cache/
|
|
60
|
+
__pycache__/
|
|
61
|
+
*.py[cod]
|
|
62
|
+
|
|
63
|
+
.venv/
|
|
64
|
+
.venv*/
|
|
65
|
+
venv/
|
|
66
|
+
env/
|
|
67
|
+
|
|
68
|
+
.idea/
|
|
69
|
+
.vscode/
|
|
70
|
+
|
|
71
|
+
results/
|
|
72
|
+
kafka_stress_artifacts/
|
|
73
|
+
rules_*.yaml
|
|
74
|
+
sample_*.json
|
|
75
|
+
!sample_transaction.json
|
|
76
|
+
*.jsonl
|
|
77
|
+
*.ndjson
|
|
78
|
+
*.parquet
|
|
79
|
+
*.avro
|
|
80
|
+
*.pb
|
|
81
|
+
*.desc
|
|
82
|
+
|
|
83
|
+
models/
|
|
84
|
+
lookups/
|
|
85
|
+
*.onnx
|
|
86
|
+
|
|
87
|
+
documentation/
|
|
88
|
+
scripts/docs/
|
|
89
|
+
.github/workflows/readme-docs-sync.yml
|
|
90
|
+
!.github/workflows/workflow.yml
|
|
91
|
+
readme_guide.md
|
|
92
|
+
|
|
93
|
+
# Product/planning source docs kept local.
|
|
94
|
+
blazerules.md
|
|
95
|
+
vde_extract/
|
|
96
|
+
MARKET_STRATEGY.md
|
|
97
|
+
docs-implementation-audit.md
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.22)
|
|
2
|
+
if(DEFINED ENV{VCPKG_ROOT} AND NOT CMAKE_TOOLCHAIN_FILE)
|
|
3
|
+
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE PATH "")
|
|
4
|
+
endif()
|
|
5
|
+
project(blazerules VERSION 0.1.0 LANGUAGES CXX)
|
|
6
|
+
include(CheckCXXCompilerFlag)
|
|
7
|
+
include(CheckIPOSupported)
|
|
8
|
+
|
|
9
|
+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
10
|
+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
|
11
|
+
message(STATUS "CMAKE_BUILD_TYPE not set; defaulting to Release")
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
15
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
16
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
17
|
+
|
|
18
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
19
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
20
|
+
|
|
21
|
+
message(STATUS "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")
|
|
22
|
+
message(STATUS "CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
|
23
|
+
|
|
24
|
+
option(BLAZERULES_NATIVE_TUNE "Tune release builds for the local CPU where safe; use OFF for distributable/cloud-portable builds" ON)
|
|
25
|
+
option(BLAZERULES_X86_AVX2 "Build AVX2/FMA runtime-dispatched kernels for x86_64" ON)
|
|
26
|
+
option(BLAZERULES_X86_AVX512 "Build optional AVX-512 runtime-dispatched kernels for x86_64" ON)
|
|
27
|
+
|
|
28
|
+
if(MSVC)
|
|
29
|
+
add_compile_options(/W4 /permissive-)
|
|
30
|
+
add_compile_options($<$<CONFIG:Debug>:/Od>)
|
|
31
|
+
add_compile_options($<$<CONFIG:Release>:/O2> $<$<CONFIG:Release>:/Ob3> $<$<CONFIG:Release>:/DNDEBUG>)
|
|
32
|
+
add_link_options($<$<CONFIG:Release>:/OPT:REF> $<$<CONFIG:Release>:/OPT:ICF>)
|
|
33
|
+
else()
|
|
34
|
+
add_compile_options(-Wall -Wextra -Wpedantic)
|
|
35
|
+
add_compile_options($<$<CONFIG:Debug>:-O0>)
|
|
36
|
+
add_compile_options($<$<CONFIG:Release>:-O3> $<$<CONFIG:Release>:-DNDEBUG>)
|
|
37
|
+
|
|
38
|
+
check_cxx_compiler_flag("-mcpu=apple-m1" HAS_APPLE_MCPU)
|
|
39
|
+
if(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64" AND HAS_APPLE_MCPU)
|
|
40
|
+
add_compile_options($<$<CONFIG:Release>:-mcpu=apple-m1>)
|
|
41
|
+
elseif(UNIX AND NOT APPLE AND BLAZERULES_NATIVE_TUNE)
|
|
42
|
+
check_cxx_compiler_flag("-march=native" HAS_MARCH_NATIVE)
|
|
43
|
+
if(HAS_MARCH_NATIVE)
|
|
44
|
+
add_compile_options($<$<CONFIG:Release>:-march=native>)
|
|
45
|
+
endif()
|
|
46
|
+
endif()
|
|
47
|
+
|
|
48
|
+
endif()
|
|
49
|
+
|
|
50
|
+
check_ipo_supported(RESULT BLAZERULES_IPO_SUPPORTED OUTPUT BLAZERULES_IPO_ERROR)
|
|
51
|
+
if(BLAZERULES_IPO_SUPPORTED)
|
|
52
|
+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
|
|
53
|
+
endif()
|
|
54
|
+
|
|
55
|
+
find_package(Arrow CONFIG REQUIRED)
|
|
56
|
+
find_package(Parquet CONFIG QUIET)
|
|
57
|
+
find_package(simdjson CONFIG REQUIRED)
|
|
58
|
+
find_package(absl CONFIG REQUIRED)
|
|
59
|
+
find_package(TBB CONFIG REQUIRED)
|
|
60
|
+
find_package(yaml-cpp CONFIG REQUIRED)
|
|
61
|
+
find_package(re2 CONFIG REQUIRED)
|
|
62
|
+
|
|
63
|
+
set(PYBIND11_FINDPYTHON ON)
|
|
64
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
65
|
+
|
|
66
|
+
add_library(blazerules_core STATIC
|
|
67
|
+
src/compiler/dsl_parser.cpp
|
|
68
|
+
src/compiler/sql_expr_parser.cpp
|
|
69
|
+
src/compiler/schema.cpp
|
|
70
|
+
src/compiler/compiler.cpp
|
|
71
|
+
src/compiler/conflict.cpp
|
|
72
|
+
src/core/kernels.cpp
|
|
73
|
+
src/core/transposer.cpp
|
|
74
|
+
src/core/dict_encoder.cpp
|
|
75
|
+
src/core/resource_resolver.cpp
|
|
76
|
+
src/core/schema_inference.cpp
|
|
77
|
+
src/core/window_store.cpp
|
|
78
|
+
src/core/model_registry.cpp
|
|
79
|
+
src/core/vector_channels.cpp
|
|
80
|
+
src/core/mmap_reader.cpp
|
|
81
|
+
src/core/orchestrator.cpp
|
|
82
|
+
src/core/engine.cpp
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
target_include_directories(blazerules_core
|
|
86
|
+
PUBLIC
|
|
87
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
88
|
+
$<INSTALL_INTERFACE:include>
|
|
89
|
+
PRIVATE
|
|
90
|
+
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
set(BLAZERULES_IS_X86_64 FALSE)
|
|
94
|
+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|amd64")
|
|
95
|
+
set(BLAZERULES_IS_X86_64 TRUE)
|
|
96
|
+
endif()
|
|
97
|
+
|
|
98
|
+
if(BLAZERULES_IS_X86_64 AND BLAZERULES_X86_AVX2)
|
|
99
|
+
if(MSVC)
|
|
100
|
+
target_sources(blazerules_core PRIVATE src/core/kernels_avx2.cpp)
|
|
101
|
+
set_source_files_properties(src/core/kernels_avx2.cpp PROPERTIES COMPILE_OPTIONS "/arch:AVX2")
|
|
102
|
+
target_compile_definitions(blazerules_core PRIVATE BLAZERULES_BUILD_AVX2=1)
|
|
103
|
+
message(STATUS "BlazeRules: AVX2 runtime kernels ENABLED (MSVC /arch:AVX2)")
|
|
104
|
+
if(BLAZERULES_X86_AVX512)
|
|
105
|
+
target_sources(blazerules_core PRIVATE src/core/kernels_avx512.cpp)
|
|
106
|
+
set_source_files_properties(src/core/kernels_avx512.cpp PROPERTIES COMPILE_OPTIONS "/arch:AVX512")
|
|
107
|
+
target_compile_definitions(blazerules_core PRIVATE BLAZERULES_BUILD_AVX512=1)
|
|
108
|
+
message(STATUS "BlazeRules: AVX-512 runtime kernels ENABLED (MSVC /arch:AVX512)")
|
|
109
|
+
endif()
|
|
110
|
+
else()
|
|
111
|
+
check_cxx_compiler_flag("-mavx2" HAS_AVX2_FLAG)
|
|
112
|
+
check_cxx_compiler_flag("-mfma" HAS_FMA_FLAG)
|
|
113
|
+
check_cxx_compiler_flag("-mbmi2" HAS_BMI2_FLAG)
|
|
114
|
+
check_cxx_compiler_flag("-mpopcnt" HAS_POPCNT_FLAG)
|
|
115
|
+
check_cxx_compiler_flag("-mlzcnt" HAS_LZCNT_FLAG)
|
|
116
|
+
if(HAS_AVX2_FLAG AND HAS_FMA_FLAG)
|
|
117
|
+
target_sources(blazerules_core PRIVATE src/core/kernels_avx2.cpp)
|
|
118
|
+
set(BLAZERULES_AVX2_FLAGS -mavx2 -mfma)
|
|
119
|
+
if(HAS_BMI2_FLAG)
|
|
120
|
+
list(APPEND BLAZERULES_AVX2_FLAGS -mbmi2)
|
|
121
|
+
endif()
|
|
122
|
+
if(HAS_POPCNT_FLAG)
|
|
123
|
+
list(APPEND BLAZERULES_AVX2_FLAGS -mpopcnt)
|
|
124
|
+
endif()
|
|
125
|
+
if(HAS_LZCNT_FLAG)
|
|
126
|
+
list(APPEND BLAZERULES_AVX2_FLAGS -mlzcnt)
|
|
127
|
+
endif()
|
|
128
|
+
set_source_files_properties(src/core/kernels_avx2.cpp PROPERTIES COMPILE_OPTIONS "${BLAZERULES_AVX2_FLAGS}")
|
|
129
|
+
target_compile_definitions(blazerules_core PRIVATE BLAZERULES_BUILD_AVX2=1)
|
|
130
|
+
message(STATUS "BlazeRules: AVX2 runtime kernels ENABLED (${BLAZERULES_AVX2_FLAGS})")
|
|
131
|
+
if(BLAZERULES_X86_AVX512)
|
|
132
|
+
check_cxx_compiler_flag("-mavx512f" HAS_AVX512F_FLAG)
|
|
133
|
+
check_cxx_compiler_flag("-mavx512bw" HAS_AVX512BW_FLAG)
|
|
134
|
+
check_cxx_compiler_flag("-mavx512vl" HAS_AVX512VL_FLAG)
|
|
135
|
+
check_cxx_compiler_flag("-mavx512dq" HAS_AVX512DQ_FLAG)
|
|
136
|
+
check_cxx_compiler_flag("-mavx512vpopcntdq" HAS_AVX512VPOPCNTDQ_FLAG)
|
|
137
|
+
if(HAS_AVX512F_FLAG AND HAS_AVX512BW_FLAG AND HAS_AVX512VL_FLAG AND HAS_AVX512DQ_FLAG)
|
|
138
|
+
target_sources(blazerules_core PRIVATE src/core/kernels_avx512.cpp)
|
|
139
|
+
set(BLAZERULES_AVX512_FLAGS -mavx512f -mavx512bw -mavx512vl -mavx512dq -mfma)
|
|
140
|
+
if(HAS_AVX512VPOPCNTDQ_FLAG)
|
|
141
|
+
list(APPEND BLAZERULES_AVX512_FLAGS -mavx512vpopcntdq)
|
|
142
|
+
endif()
|
|
143
|
+
set_source_files_properties(src/core/kernels_avx512.cpp PROPERTIES COMPILE_OPTIONS "${BLAZERULES_AVX512_FLAGS}")
|
|
144
|
+
target_compile_definitions(blazerules_core PRIVATE BLAZERULES_BUILD_AVX512=1)
|
|
145
|
+
message(STATUS "BlazeRules: AVX-512 runtime kernels ENABLED (${BLAZERULES_AVX512_FLAGS})")
|
|
146
|
+
else()
|
|
147
|
+
message(STATUS "BlazeRules: AVX-512 runtime kernels DISABLED (compiler lacks required flags)")
|
|
148
|
+
endif()
|
|
149
|
+
endif()
|
|
150
|
+
else()
|
|
151
|
+
message(STATUS "BlazeRules: AVX2 runtime kernels DISABLED (compiler lacks -mavx2/-mfma)")
|
|
152
|
+
endif()
|
|
153
|
+
endif()
|
|
154
|
+
endif()
|
|
155
|
+
|
|
156
|
+
target_link_libraries(blazerules_core
|
|
157
|
+
PUBLIC
|
|
158
|
+
Arrow::arrow_static
|
|
159
|
+
simdjson::simdjson
|
|
160
|
+
absl::flat_hash_map
|
|
161
|
+
TBB::tbb
|
|
162
|
+
yaml-cpp::yaml-cpp
|
|
163
|
+
re2::re2
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
if(TARGET Parquet::parquet_static)
|
|
167
|
+
target_link_libraries(blazerules_core PUBLIC Parquet::parquet_static)
|
|
168
|
+
elseif(TARGET Parquet::parquet_shared)
|
|
169
|
+
target_link_libraries(blazerules_core PUBLIC Parquet::parquet_shared)
|
|
170
|
+
elseif(TARGET parquet_static)
|
|
171
|
+
target_link_libraries(blazerules_core PUBLIC parquet_static)
|
|
172
|
+
endif()
|
|
173
|
+
|
|
174
|
+
option(BLAZERULES_ENABLE_ONNX "Embedded ONNX Runtime ML scoring (model_score)" ON)
|
|
175
|
+
if(BLAZERULES_ENABLE_ONNX)
|
|
176
|
+
find_package(onnxruntime CONFIG REQUIRED)
|
|
177
|
+
target_link_libraries(blazerules_core PUBLIC onnxruntime::onnxruntime)
|
|
178
|
+
target_compile_definitions(blazerules_core PUBLIC BLAZERULES_ENABLE_ONNX)
|
|
179
|
+
message(STATUS "BlazeRules: ONNX Runtime ML scoring ENABLED")
|
|
180
|
+
else()
|
|
181
|
+
message(STATUS "BlazeRules: ONNX Runtime ML scoring DISABLED (lean build)")
|
|
182
|
+
endif()
|
|
183
|
+
|
|
184
|
+
add_executable(blazerules_driver src/driver/main.cpp)
|
|
185
|
+
target_link_libraries(blazerules_driver PRIVATE blazerules_core)
|
|
186
|
+
|
|
187
|
+
pybind11_add_module(blazerules MODULE src/bindings/pybind_module.cpp)
|
|
188
|
+
target_link_libraries(blazerules PRIVATE blazerules_core)
|
|
189
|
+
install(TARGETS blazerules
|
|
190
|
+
DESTINATION .
|
|
191
|
+
COMPONENT python)
|
|
192
|
+
|
|
193
|
+
option(BLAZERULES_IO "Build streaming/IO connectors (Kafka, CDC, decoders)" ON)
|
|
194
|
+
option(BLAZERULES_IO_KAFKA "Kafka source/sink via librdkafka (needs the io module)" ON)
|
|
195
|
+
option(BLAZERULES_IO_AVRO "Avro binary decoder in blazerules_io" ON)
|
|
196
|
+
option(BLAZERULES_IO_PROTOBUF "Protobuf dynamic descriptor decoder in blazerules_io" ON)
|
|
197
|
+
option(BLAZERULES_IO_S3 "Compatibility flag; exact-object s3:// IO uses the AWS CLI cache path" ON)
|
|
198
|
+
if(BLAZERULES_IO)
|
|
199
|
+
set(BLAZERULES_IO_SOURCES
|
|
200
|
+
src/io/cdc.cpp
|
|
201
|
+
src/io/file_reader.cpp
|
|
202
|
+
src/io/decoders/common.cpp
|
|
203
|
+
src/io/decoders/arrow_ipc.cpp
|
|
204
|
+
)
|
|
205
|
+
if(BLAZERULES_IO_KAFKA)
|
|
206
|
+
find_package(RdKafka CONFIG QUIET)
|
|
207
|
+
if(NOT TARGET RdKafka::rdkafka++)
|
|
208
|
+
find_package(unofficial-librdkafka CONFIG QUIET)
|
|
209
|
+
endif()
|
|
210
|
+
list(APPEND BLAZERULES_IO_SOURCES src/io/kafka.cpp)
|
|
211
|
+
list(APPEND BLAZERULES_IO_SOURCES src/io/stream_runtime.cpp)
|
|
212
|
+
endif()
|
|
213
|
+
if(BLAZERULES_IO_AVRO)
|
|
214
|
+
find_package(fmt CONFIG REQUIRED)
|
|
215
|
+
find_package(ZLIB REQUIRED)
|
|
216
|
+
find_path(AVRO_CPP_INCLUDE_DIR avro/Compiler.hh REQUIRED)
|
|
217
|
+
find_library(AVRO_CPP_LIBRARY NAMES avrocpp_s REQUIRED)
|
|
218
|
+
list(APPEND BLAZERULES_IO_SOURCES src/io/decoders/avro.cpp)
|
|
219
|
+
endif()
|
|
220
|
+
if(BLAZERULES_IO_PROTOBUF)
|
|
221
|
+
find_package(protobuf CONFIG REQUIRED)
|
|
222
|
+
list(APPEND BLAZERULES_IO_SOURCES src/io/decoders/protobuf.cpp)
|
|
223
|
+
endif()
|
|
224
|
+
add_library(blazerules_io STATIC ${BLAZERULES_IO_SOURCES})
|
|
225
|
+
target_link_libraries(blazerules_io PUBLIC blazerules_core)
|
|
226
|
+
target_include_directories(blazerules_io PUBLIC
|
|
227
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
|
228
|
+
if(BLAZERULES_IO_KAFKA)
|
|
229
|
+
if(TARGET RdKafka::rdkafka++)
|
|
230
|
+
target_link_libraries(blazerules_io PUBLIC RdKafka::rdkafka++)
|
|
231
|
+
elseif(TARGET unofficial::librdkafka::librdkafka)
|
|
232
|
+
target_link_libraries(blazerules_io PUBLIC unofficial::librdkafka::librdkafka)
|
|
233
|
+
endif()
|
|
234
|
+
target_compile_definitions(blazerules_io PUBLIC BLAZERULES_IO_KAFKA)
|
|
235
|
+
endif()
|
|
236
|
+
if(BLAZERULES_IO_AVRO)
|
|
237
|
+
target_include_directories(blazerules_io PUBLIC ${AVRO_CPP_INCLUDE_DIR})
|
|
238
|
+
target_link_libraries(blazerules_io PUBLIC ${AVRO_CPP_LIBRARY} fmt::fmt ZLIB::ZLIB)
|
|
239
|
+
target_compile_definitions(blazerules_io PUBLIC BLAZERULES_IO_AVRO)
|
|
240
|
+
endif()
|
|
241
|
+
if(BLAZERULES_IO_PROTOBUF)
|
|
242
|
+
target_link_libraries(blazerules_io PUBLIC protobuf::libprotobuf)
|
|
243
|
+
target_compile_definitions(blazerules_io PUBLIC BLAZERULES_IO_PROTOBUF)
|
|
244
|
+
endif()
|
|
245
|
+
if(BLAZERULES_IO_S3)
|
|
246
|
+
target_compile_definitions(blazerules_io PUBLIC BLAZERULES_IO_S3)
|
|
247
|
+
endif()
|
|
248
|
+
|
|
249
|
+
pybind11_add_module(blazerules_io_py MODULE src/bindings/pybind_io_module.cpp)
|
|
250
|
+
set_target_properties(blazerules_io_py PROPERTIES OUTPUT_NAME blazerules_io)
|
|
251
|
+
target_link_libraries(blazerules_io_py PRIVATE blazerules_io)
|
|
252
|
+
install(TARGETS blazerules_io_py
|
|
253
|
+
DESTINATION .
|
|
254
|
+
COMPONENT python)
|
|
255
|
+
message(STATUS "BlazeRules: IO connectors ENABLED (kafka=${BLAZERULES_IO_KAFKA}, avro=${BLAZERULES_IO_AVRO}, protobuf=${BLAZERULES_IO_PROTOBUF}, s3=${BLAZERULES_IO_S3})")
|
|
256
|
+
endif()
|
|
257
|
+
|
|
258
|
+
option(BLAZERULES_DASHBOARD "Build the local read-only BlazeRules dashboard server" ON)
|
|
259
|
+
if(BLAZERULES_DASHBOARD)
|
|
260
|
+
find_package(httplib CONFIG REQUIRED)
|
|
261
|
+
add_executable(blazerules_dashboard src/dashboard/main.cpp)
|
|
262
|
+
target_include_directories(blazerules_dashboard PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
263
|
+
target_link_libraries(blazerules_dashboard PRIVATE httplib::httplib)
|
|
264
|
+
if(UNIX AND NOT APPLE)
|
|
265
|
+
target_link_libraries(blazerules_dashboard PRIVATE anl)
|
|
266
|
+
endif()
|
|
267
|
+
install(TARGETS blazerules_dashboard RUNTIME DESTINATION bin COMPONENT python)
|
|
268
|
+
message(STATUS "BlazeRules: dashboard server ENABLED")
|
|
269
|
+
endif()
|
|
270
|
+
|
|
271
|
+
option(BLAZERULES_AGENT "Build the BlazeRules local multi-instance ingest agent" ON)
|
|
272
|
+
if(BLAZERULES_AGENT)
|
|
273
|
+
find_package(httplib CONFIG REQUIRED)
|
|
274
|
+
add_executable(blazerules_agent src/agent/main.cpp)
|
|
275
|
+
target_include_directories(blazerules_agent PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
276
|
+
target_link_libraries(blazerules_agent PRIVATE blazerules_core httplib::httplib)
|
|
277
|
+
if(UNIX AND NOT APPLE)
|
|
278
|
+
target_link_libraries(blazerules_agent PRIVATE anl)
|
|
279
|
+
endif()
|
|
280
|
+
install(TARGETS blazerules_agent RUNTIME DESTINATION bin COMPONENT python)
|
|
281
|
+
message(STATUS "BlazeRules: agent ENABLED")
|
|
282
|
+
endif()
|
|
283
|
+
|
|
284
|
+
install(TARGETS blazerules_core
|
|
285
|
+
EXPORT blazerulesTargets
|
|
286
|
+
ARCHIVE DESTINATION lib
|
|
287
|
+
LIBRARY DESTINATION lib
|
|
288
|
+
RUNTIME DESTINATION bin
|
|
289
|
+
COMPONENT dev)
|
|
290
|
+
|
|
291
|
+
install(DIRECTORY include/blazerules DESTINATION include COMPONENT dev)
|
|
292
|
+
|
|
293
|
+
install(EXPORT blazerulesTargets
|
|
294
|
+
NAMESPACE blazerules::
|
|
295
|
+
DESTINATION lib/cmake/blazerules
|
|
296
|
+
COMPONENT dev)
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 6,
|
|
3
|
+
"cmakeMinimumRequired": {
|
|
4
|
+
"major": 3,
|
|
5
|
+
"minor": 22,
|
|
6
|
+
"patch": 0
|
|
7
|
+
},
|
|
8
|
+
"configurePresets": [
|
|
9
|
+
{
|
|
10
|
+
"name": "macos-arm64-release",
|
|
11
|
+
"displayName": "macOS arm64 Release",
|
|
12
|
+
"generator": "Ninja",
|
|
13
|
+
"binaryDir": "${sourceDir}/cmake-build-release",
|
|
14
|
+
"cacheVariables": {
|
|
15
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
16
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
17
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
18
|
+
"BLAZERULES_AGENT": "ON"
|
|
19
|
+
},
|
|
20
|
+
"condition": {
|
|
21
|
+
"type": "equals",
|
|
22
|
+
"lhs": "${hostSystemName}",
|
|
23
|
+
"rhs": "Darwin"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "linux-release-native",
|
|
28
|
+
"displayName": "Linux Release native CPU",
|
|
29
|
+
"generator": "Ninja",
|
|
30
|
+
"binaryDir": "${sourceDir}/cmake-build-linux-release",
|
|
31
|
+
"cacheVariables": {
|
|
32
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
33
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
34
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
35
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
36
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
37
|
+
"BLAZERULES_AGENT": "ON"
|
|
38
|
+
},
|
|
39
|
+
"condition": {
|
|
40
|
+
"type": "equals",
|
|
41
|
+
"lhs": "${hostSystemName}",
|
|
42
|
+
"rhs": "Linux"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "linux-release-avx2",
|
|
47
|
+
"displayName": "Linux Release AVX2",
|
|
48
|
+
"generator": "Ninja",
|
|
49
|
+
"binaryDir": "${sourceDir}/cmake-build-linux-avx2",
|
|
50
|
+
"cacheVariables": {
|
|
51
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
52
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
53
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
54
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
55
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
56
|
+
"BLAZERULES_AGENT": "ON"
|
|
57
|
+
},
|
|
58
|
+
"condition": {
|
|
59
|
+
"type": "equals",
|
|
60
|
+
"lhs": "${hostSystemName}",
|
|
61
|
+
"rhs": "Linux"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "linux-x86_64-release-dispatch",
|
|
66
|
+
"displayName": "Linux x86_64 Release runtime dispatch",
|
|
67
|
+
"generator": "Ninja",
|
|
68
|
+
"binaryDir": "${sourceDir}/cmake-build-linux-dispatch",
|
|
69
|
+
"cacheVariables": {
|
|
70
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
71
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
72
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
73
|
+
"BLAZERULES_X86_AVX512": "ON",
|
|
74
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
75
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
76
|
+
"BLAZERULES_AGENT": "ON"
|
|
77
|
+
},
|
|
78
|
+
"condition": {
|
|
79
|
+
"type": "equals",
|
|
80
|
+
"lhs": "${hostSystemName}",
|
|
81
|
+
"rhs": "Linux"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "linux-x86_64-release-avx512",
|
|
86
|
+
"displayName": "Linux x86_64 Release runtime dispatch + AVX-512 opt-in",
|
|
87
|
+
"generator": "Ninja",
|
|
88
|
+
"binaryDir": "${sourceDir}/cmake-build-linux-avx512",
|
|
89
|
+
"cacheVariables": {
|
|
90
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
91
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
92
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
93
|
+
"BLAZERULES_X86_AVX512": "ON",
|
|
94
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
95
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
96
|
+
"BLAZERULES_AGENT": "ON"
|
|
97
|
+
},
|
|
98
|
+
"condition": {
|
|
99
|
+
"type": "equals",
|
|
100
|
+
"lhs": "${hostSystemName}",
|
|
101
|
+
"rhs": "Linux"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "linux-arm64-release-neon",
|
|
106
|
+
"displayName": "Linux arm64 Release NEON",
|
|
107
|
+
"generator": "Ninja",
|
|
108
|
+
"binaryDir": "${sourceDir}/cmake-build-linux-arm64",
|
|
109
|
+
"cacheVariables": {
|
|
110
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
111
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
112
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
113
|
+
"BLAZERULES_X86_AVX512": "ON",
|
|
114
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
115
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
116
|
+
"BLAZERULES_AGENT": "ON"
|
|
117
|
+
},
|
|
118
|
+
"condition": {
|
|
119
|
+
"type": "equals",
|
|
120
|
+
"lhs": "${hostSystemName}",
|
|
121
|
+
"rhs": "Linux"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "cloud-portable-release",
|
|
126
|
+
"displayName": "Cloud portable Release runtime dispatch",
|
|
127
|
+
"generator": "Ninja",
|
|
128
|
+
"binaryDir": "${sourceDir}/cmake-build-cloud-portable",
|
|
129
|
+
"cacheVariables": {
|
|
130
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
131
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
132
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
133
|
+
"BLAZERULES_X86_AVX512": "ON",
|
|
134
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
135
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
136
|
+
"BLAZERULES_AGENT": "ON"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "windows-msvc-release",
|
|
141
|
+
"displayName": "Windows MSVC Release",
|
|
142
|
+
"generator": "Ninja",
|
|
143
|
+
"binaryDir": "${sourceDir}/cmake-build-windows-release",
|
|
144
|
+
"cacheVariables": {
|
|
145
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
146
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
147
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
148
|
+
"BLAZERULES_X86_AVX512": "ON",
|
|
149
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
150
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
151
|
+
"BLAZERULES_AGENT": "ON"
|
|
152
|
+
},
|
|
153
|
+
"condition": {
|
|
154
|
+
"type": "equals",
|
|
155
|
+
"lhs": "${hostSystemName}",
|
|
156
|
+
"rhs": "Windows"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "windows-x64-release-dispatch",
|
|
161
|
+
"displayName": "Windows x64 Release runtime dispatch",
|
|
162
|
+
"generator": "Ninja",
|
|
163
|
+
"binaryDir": "${sourceDir}/cmake-build-windows-dispatch",
|
|
164
|
+
"cacheVariables": {
|
|
165
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
166
|
+
"BLAZERULES_NATIVE_TUNE": "ON",
|
|
167
|
+
"BLAZERULES_X86_AVX2": "ON",
|
|
168
|
+
"BLAZERULES_X86_AVX512": "ON",
|
|
169
|
+
"BLAZERULES_ENABLE_ONNX": "ON",
|
|
170
|
+
"BLAZERULES_DASHBOARD": "ON",
|
|
171
|
+
"BLAZERULES_AGENT": "ON"
|
|
172
|
+
},
|
|
173
|
+
"condition": {
|
|
174
|
+
"type": "equals",
|
|
175
|
+
"lhs": "${hostSystemName}",
|
|
176
|
+
"rhs": "Windows"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"buildPresets": [
|
|
181
|
+
{
|
|
182
|
+
"name": "macos-arm64-release",
|
|
183
|
+
"configurePreset": "macos-arm64-release",
|
|
184
|
+
"targets": [
|
|
185
|
+
"blazerules_core",
|
|
186
|
+
"blazerules",
|
|
187
|
+
"blazerules_driver",
|
|
188
|
+
"blazerules_dashboard",
|
|
189
|
+
"blazerules_agent"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "linux-release-native",
|
|
194
|
+
"configurePreset": "linux-release-native",
|
|
195
|
+
"targets": [
|
|
196
|
+
"blazerules_core",
|
|
197
|
+
"blazerules",
|
|
198
|
+
"blazerules_driver",
|
|
199
|
+
"blazerules_dashboard",
|
|
200
|
+
"blazerules_agent"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "linux-release-avx2",
|
|
205
|
+
"configurePreset": "linux-release-avx2",
|
|
206
|
+
"targets": [
|
|
207
|
+
"blazerules_core",
|
|
208
|
+
"blazerules",
|
|
209
|
+
"blazerules_driver",
|
|
210
|
+
"blazerules_dashboard",
|
|
211
|
+
"blazerules_agent"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "windows-msvc-release",
|
|
216
|
+
"configurePreset": "windows-msvc-release",
|
|
217
|
+
"targets": [
|
|
218
|
+
"blazerules_core",
|
|
219
|
+
"blazerules",
|
|
220
|
+
"blazerules_driver",
|
|
221
|
+
"blazerules_dashboard",
|
|
222
|
+
"blazerules_agent"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "linux-x86_64-release-dispatch",
|
|
227
|
+
"configurePreset": "linux-x86_64-release-dispatch",
|
|
228
|
+
"targets": [
|
|
229
|
+
"blazerules_core",
|
|
230
|
+
"blazerules",
|
|
231
|
+
"blazerules_driver",
|
|
232
|
+
"blazerules_dashboard",
|
|
233
|
+
"blazerules_agent"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "linux-x86_64-release-avx512",
|
|
238
|
+
"configurePreset": "linux-x86_64-release-avx512",
|
|
239
|
+
"targets": [
|
|
240
|
+
"blazerules_core",
|
|
241
|
+
"blazerules",
|
|
242
|
+
"blazerules_driver",
|
|
243
|
+
"blazerules_dashboard",
|
|
244
|
+
"blazerules_agent"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"name": "linux-arm64-release-neon",
|
|
249
|
+
"configurePreset": "linux-arm64-release-neon",
|
|
250
|
+
"targets": [
|
|
251
|
+
"blazerules_core",
|
|
252
|
+
"blazerules",
|
|
253
|
+
"blazerules_driver",
|
|
254
|
+
"blazerules_dashboard",
|
|
255
|
+
"blazerules_agent"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "cloud-portable-release",
|
|
260
|
+
"configurePreset": "cloud-portable-release",
|
|
261
|
+
"targets": [
|
|
262
|
+
"blazerules_core",
|
|
263
|
+
"blazerules",
|
|
264
|
+
"blazerules_driver",
|
|
265
|
+
"blazerules_dashboard",
|
|
266
|
+
"blazerules_agent"
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "windows-x64-release-dispatch",
|
|
271
|
+
"configurePreset": "windows-x64-release-dispatch",
|
|
272
|
+
"targets": [
|
|
273
|
+
"blazerules_core",
|
|
274
|
+
"blazerules",
|
|
275
|
+
"blazerules_driver",
|
|
276
|
+
"blazerules_dashboard",
|
|
277
|
+
"blazerules_agent"
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
}
|