Install Rust (stable):
winget install --id Rustlang.Rustup -eInstall Visual Studio Build Tools (C++ workload):
winget install --id Microsoft.VisualStudio.2022.BuildTools -eInstall Git:
winget install --id Git.Git -egit clone --recursive https://github.com/eugenehp/llama-cpp-rs
cd llama-cpp-rsIf already cloned without submodules:
git submodule update --init --recursiveInstall Vulkan SDK (includes headers, loader, and glslc):
choco install vulkan-sdk -yThe build script automatically detects the Vulkan SDK by checking:
- The
VULKAN_SDKenvironment variable (if set). - The Windows registry (
HKLM\SOFTWARE\LunarG\VulkanSDK). - The default install directory
C:\VulkanSDK\<latest version>.
If automatic detection fails, set the SDK path manually for the current session (PowerShell):
$latest = Get-ChildItem 'C:\VulkanSDK' -Directory | Sort-Object Name -Descending | Select-Object -First 1
$env:VULKAN_SDK = $latest.FullName
$env:Path = "$($latest.FullName)\Bin;$env:Path"Verify tools:
glslc --version
vulkaninfo --summarycargo build
cargo build --features vulkanIf you see:
Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR glslc)
then the Vulkan SDK is not installed correctly. The build script tries to find it automatically, but if that fails, ensure VULKAN_SDK is set and glslc is on your PATH.
The repository CI includes a Windows Vulkan build check in:
.github/workflows/llama-cpp-rs-check.yml