DocsBuilding
Building from Source
Complete build instructions for all CyxWiz components on Windows, Linux, and macOS.
Prerequisites
| Tool | Version | Windows | Linux | macOS |
|---|---|---|---|---|
| CMake | 3.20+ | cmake.org | apt install cmake | brew install cmake |
| Git | 2.0+ | git-scm.com | apt install git | brew install git |
| Rust | 1.70+ | rustup.rs | rustup.rs | rustup.rs |
| Python | 3.8+ | python.org | apt install python3 | brew install python |
C++ Compiler
Windows
MSVC 2022+
Install Visual Studio 2022 with C++ workload
Linux
GCC 10+ or Clang 12+
apt install build-essential
macOS
Clang 12+
xcode-select --install
Quick Start
Windows
REM From Developer Command Prompt for VS 2022 REM Clone repository git clone https://github.com/CYXWIZ-Lab/CYXWIZ.git cd CyxWiz REM First-time setup setup.bat REM Build all components build.bat REM Or build release only build.bat release
Linux/macOS
# Clone repository git clone https://github.com/CYXWIZ-Lab/CYXWIZ.git cd CyxWiz # First-time setup chmod +x scripts/*.sh ./scripts/setup.sh # Build all components ./scripts/build.sh # Or build release only ./scripts/build.sh release
Manual Build Process
Step 1: Install vcpkg Dependencies
# Clone vcpkg (if not present) git clone https://github.com/microsoft/vcpkg.git # Bootstrap vcpkg cd vcpkg ./bootstrap-vcpkg.sh # Linux/macOS # or .\bootstrap-vcpkg.bat # Windows # Install dependencies (reads vcpkg.json) ./vcpkg install cd ..
Step 2: Configure with CMake
# Windows Debug cmake --preset windows-debug # Windows Release cmake --preset windows-release # Linux Debug cmake --preset linux-debug # Linux Release cmake --preset linux-release # macOS Debug cmake --preset macos-debug # macOS Release cmake --preset macos-release
Step 3: Build
# Build configured preset cmake --build build/<preset-name> --config Release # Build with parallel jobs cmake --build build/windows-release --config Release -j 8 # Build specific target cmake --build build/windows-release --target cyxwiz-engine
Step 4: Run Tests
cd build/<preset-name> ctest --output-on-failure # Run specific test ./bin/cyxwiz-tests "[tensor]"
CMake Presets
| Preset | Platform | Build Type | Description |
|---|---|---|---|
| windows-debug | Windows | Debug | Development with symbols |
| windows-release | Windows | Release | Optimized production |
| linux-debug | Linux | Debug | Development with symbols |
| linux-release | Linux | Release | Optimized production |
| macos-debug | macOS | Debug | Development with symbols |
| macos-release | macOS | Release | Optimized production |
| android-release | Android | Release | Mobile backend only |
Build Options
# Enable/disable components cmake --preset windows-release \ -DCYXWIZ_BUILD_ENGINE=ON \ -DCYXWIZ_BUILD_SERVER_NODE=ON \ -DCYXWIZ_BUILD_TESTS=ON # GPU backends cmake --preset linux-release \ -DCYXWIZ_ENABLE_CUDA=ON \ -DCYXWIZ_ENABLE_OPENCL=ON # Python bindings cmake --preset linux-release \ -DCYXWIZ_BUILD_PYTHON=ON \ -DPython3_EXECUTABLE=/usr/bin/python3
| Option | Default | Description |
|---|---|---|
| CYXWIZ_BUILD_ENGINE | ON | Build desktop client |
| CYXWIZ_BUILD_SERVER_NODE | ON | Build compute node |
| CYXWIZ_BUILD_TESTS | ON | Build test suite |
| CYXWIZ_BUILD_PYTHON | ON | Build Python bindings |
| CYXWIZ_ENABLE_CUDA | OFF | Enable CUDA backend |
| CYXWIZ_ENABLE_OPENCL | ON | Enable OpenCL backend |
| CYXWIZ_ENABLE_PROFILING | OFF | Enable profiling |
Building Individual Components
CyxWiz Engine Only
cmake --preset windows-release \ -DCYXWIZ_BUILD_SERVER_NODE=OFF cmake --build build/windows-release \ --target cyxwiz-engine
Server Node Only
cmake --preset linux-release \ -DCYXWIZ_BUILD_ENGINE=OFF cmake --build build/linux-release \ --target cyxwiz-server-node
Backend Library Only
cmake --build build/windows-release \ --target cyxwiz-backend
Central Server (Rust)
cd cyxwiz-central-server # Set protoc path (Windows) set PROTOC=..\vcpkg\packages\... # Build and run cargo build --release cargo run --release
Build Artifacts
Windows
build/windows-release/
├── bin/
│ ├── cyxwiz-engine.exe
│ ├── cyxwiz-server-node.exe
│ └── cyxwiz-tests.exe
├── lib/
│ ├── cyxwiz-backend.dll
│ └── cyxwiz-backend.lib
└── python/
└── pycyxwiz.pydLinux
build/linux-release/
├── bin/
│ ├── cyxwiz-engine
│ ├── cyxwiz-server-node
│ └── cyxwiz-tests
├── lib/
│ └── libcyxwiz-backend.so
└── python/
└── pycyxwiz.soBuilding with CUDA
- Install CUDA Toolkit from developer.nvidia.com
- Install NVIDIA driver
- Verify:
nvidia-smi
cmake --preset linux-release \ -DCYXWIZ_ENABLE_CUDA=ON \ -DCMAKE_CUDA_ARCHITECTURES="75;80;86"
| GPU Generation | Architecture | CUDA Arch |
|---|---|---|
| RTX 20xx | Turing | 75 |
| RTX 30xx | Ampere | 86 |
| RTX 40xx | Ada Lovelace | 89 |
Troubleshooting
"ArrayFire not found"
cmake --preset linux-release \ -DArrayFire_DIR=/opt/arrayfire/...
"vcpkg dependencies missing"
cd vcpkg ./vcpkg install
"gRPC generation failed"
./vcpkg install protobuf grpc protoc --cpp_out=. *.proto
Clean Build
rm -rf build/ # Or clean specific preset cmake --build build/... --target clean