This manual provides a step-by-step guide to compiling the Quad Kernel Streaming Pipeline. Since this is a polyglot system (C, C++, Ada, Rust), the build order is critical.
This project links code from 3 different compilers:
gcc(System/Video - C)g++(Audio - C++)gnat(Math - Ada)rustc(Bridge - Rust)
Crucial: To avoid ABI (Application Binary Interface) mismatches, all components must target the GNU ABI on Windows (x86_64-w64-mingw32 / x86_64-pc-windows-gnu). Do not mix MSVC and GNU targets.
Ensure you have cloned the repository and entered the directory:
git clone https://github.com/YOUR_USER/quad-kernel-streaming.git
cd quad-kernel-streamingThe Ada kernel provides mathematical precision and validation. We use Alire to manage it.
-
Navigate to the Ada directory:
cd quad_kernel_ada_math -
Build the static library:
alr build
-
Verify Output: Check that
libquad_math.aexists inquad_kernel_ada_math/lib/.Note: If Alire asks to install a toolchain (gnat_native), verify YES.
-
Return to root:
cd ..
The Rust kernel handles WebSocket communication. We must build it as a static library using the GNU target.
-
Navigate to the Rust directory:
cd quad_kernel_rust_wasm -
Add the GNU target (if not already added):
rustup target add x86_64-pc-windows-gnu
-
Build the static library:
cargo build --release --target x86_64-pc-windows-gnu
-
Verify Output: Check for
libquad_kernel_rust_wasm.ainquad_kernel_rust_wasm/target/x86_64-pc-windows-gnu/release/. -
Return to root:
cd ..
This step compiles the Video (C) and Audio (C++) kernels and links everything together using CMake.
-
Create a build directory:
mkdir build_final cd build_final -
Configure CMake: We explicitly tell CMake to use the GCC/G++ compilers (often synonymous with the ones Alire uses, or your system MinGW).
cmake .. -G "MinGW Makefiles"Tip: If you encounter errors about missing Ada libs, ensure the paths in
CMakeLists.txtpoint to your Alire toolchain location. -
Compile and Link:
cmake --build .
If compilation is successful, you will see quad_kernel_system.exe in the build directory.
Run it:
./quad_kernel_system.exe=== QUAD KERNEL STREAMING SYSTEM v1.0 ===
[BRIDGE] Initializing Quad Kernel IPC Bridge...
[NVENC] Initializing encoder on device 0 for 3840x2160
[VIDEO KERNEL] Initialized successfully (4K H.265).
[AUDIO KERNEL] Initialized successfully (stub mode).
[MATH KERNEL] Initialized Precision Validation Engine.
[SYSTEM] Pipeline ready.
...
- Cause: The system tried to link against real libopus but it's not installed.
- Fix: Ensure the C++ audio adapter is using the STUB implementation (default in this repo) or install libopus and update CMakeLists.txt.
- Cause: The linker cannot find the Ada runtime libraries.
- Fix: Open
CMakeLists.txtand verify thelink_directoriespath points to your actual Alire GNAT installation (e.g., inside%LOCALAPPDATA%\alire\cache\toolchains\...).
- Cause: You likely built Rust with the MSVC target (default on Windows) instead of GNU.
- Fix: Re-run Step 3 ensuring
--target x86_64-pc-windows-gnuis used.