Building Hyperdrive for Windows requires some Windows-specific setup. The following guide is written for a Windows 10 machine. We recommend using PowerShell as opposed to CommandPrompt.

Get git

Follow this guide to get git.

Get choco

Follow this guide to set up choco, a package manager. In summary:

  1. Open PowerShell as administrator,
  2. Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    

Get Rust & cargo

Follow this guide; specifically get and run the installer .exe from https://doc.rust-lang.org/cargo/getting-started/installation.html.

Get dependencies

choco install mingw llvm cmake

Build Unix-sourced artifacts & Windows runtime

On Unix

pushd hyperdrive/src/register-ui
./build.sh
popd
cargo run -p build-packages
./scripts/build-windows-artifact.py
# Copy target/windows-artifact.zip over to Windows machine

On Windows

# Unzip windows-artifact.zip
cd windows-artifact
(Get-Content Cargo.toml) | Where-Object { $_ -notmatch '"scripts/build-packages",' -and $_ -notmatch 'hyperdrive/packages' } | Set-Content Cargo.toml
$env:SKIP_BUILD_FRONTEND = "1"
cargo build -p hyperdrive

Original gist on GitHub