This guide will help you set up your development environment to build and run Nanvix on Windows.
- 1. Check Your System and Permissions
- 2. Enable Developer Mode
- 3. Clone This Repository
- 4. Enable Windows Hypervisor Platform
- 5. Run Setup
- 6. Verus (Formal Verification, Optional)
- 7. Setup Your IDE (Optional)
- Ensure you are running Windows 11
- Ensure you have administrator privileges
This repository uses symbolic links. On Windows, Git needs Developer Mode enabled to create native symlinks during clone. Without it, symlinks are checked out as small text files and tools that expect real files may fail.
- Open Settings > System > Advanced > For developers.
- Turn on Developer Mode.
Using the Settings app may prompt for approval, but it does not require you to manually open an elevated PowerShell session.
Alternatively, enable it from PowerShell. This command does require an elevated PowerShell session:
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v AllowDevelopmentWithoutDevLicense /d 1$env:WORKDIR = "$env:USERPROFILE\nanvix" # Set the directory for the source tree.
New-Item -ItemType Directory -Path $env:WORKDIR -Force; cd $env:WORKDIR # Create the workspace and navigate to it.
git clone -c core.symlinks=true https://github.com/nanvix/nanvix.git # Clone the repository.
cd nanvix # Navigate to the Nanvix source tree.Note: The
-c core.symlinks=trueflag ensures Git creates native symlinks instead of text stub files. This requires Developer Mode to be enabled. If you already cloned without this flag, prefer re-cloning after enabling Developer Mode so your existing worktree is not overwritten.Note: Cloning the repository does not require an elevated PowerShell session once Developer Mode is enabled.
The Windows Hypervisor Platform (WHP) feature is required to run the UserVM natively. This step requires an elevated PowerShell session.
# Run in an elevated PowerShell prompt.
Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -AllRestart your machine after enabling the feature.
.\z.ps1 setupThis command validates prerequisites and configures the development environment:
- Verifies you are running Windows 11.
- Verifies Developer Mode is enabled.
- Verifies the Windows Hypervisor Platform is active.
- Installs Git via winget (if not already installed).
- Installs Python 3.12 via winget (if not already installed).
- Installs GNU Make via winget (if not already installed).
- Checks for Visual Studio Build Tools (warns if missing).
- Installs LLVM/Clang via winget (if not already installed).
- Installs the Rust toolchain via winget (if not already installed).
- Configures the repository Git hooks from
.githooks.
Note: If winget is not available, install the prerequisites manually before running setup:
- Git:
winget install Git.Git(see git-scm.com)- Python 3.10+:
winget install Python.Python.3.12(see python.org)- GNU Make:
winget install ezwinports.make- LLVM/Clang:
winget install LLVM.LLVM- Rust:
winget install Rustlang.Rustup(see rustup.rs)
Verus formal verification is optional. When VERUS_EXECUTABLE_DIR is not set, verification
is skipped.
The easiest way to install Verus is via the setup command:
.\z.ps1 setup --verusThis installs the pinned Verus release to %USERPROFILE%\verus. You can also invoke the
setup script directly to choose a custom install directory:
python .\scripts\setup\verus.py C:\verusThe script downloads the prebuilt Windows binary from the Verus GitHub releases page, validates the archive, and installs it to the given directory. The default setup location is used automatically:
.\z.ps1 build -- verifySet VERUS_EXECUTABLE_DIR when using a custom installation directory:
.\z.ps1 build -- verify VERUS_EXECUTABLE_DIR=C:\verusNote: The expected version is pinned in
build/verus-version. Re-runsetup --verusor the setup script after version bumps to update the installation.
Choose one of the following options to set up your IDE for Nanvix development.
Use the host-specific settings template below. The Windows template invokes ./z.bat and routes
Rust Analyzer build-script discovery through the Windows build workflow.
New-Item -ItemType Directory -Path .vscode -Force
Copy-Item scripts\setup\vscode\settings-windows.json .vscode\settings.json