Alpha. Vary is under active development and not ready for production use. Syntax, APIs, performance, and behaviour may change between releases.
Windows
Note: Linux is the reference platform. Windows is supported via bundled JRE and the varyup toolchain manager.
Quick install
One command installs varyup (the toolchain manager) and the latest Vary toolchain.
Open PowerShell and run:
irm https://github.com/ccollicutt/vary/releases/latest/download/install.ps1 | iex
This will download varyup.exe to %LOCALAPPDATA%\vary\bin\, install the latest Vary toolchain, and install the vary.exe compiler shim.
Then add %LOCALAPPDATA%\vary\bin to your user PATH:
$path = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$env:LOCALAPPDATA\vary\bin;$path", "User")
Note: The installer does not modify your PATH automatically. Adding the PATH entry is a manual step by design, so nothing is changed in your environment without your knowledge.
Open a new terminal, then verify:
vary --version
You should see:
Vary vX-alpha.Y
Options
| Parameter | Effect |
|---|---|
-SkipToolchain | Skip automatic toolchain install |
Environment variables VARY_HOME (default: %LOCALAPPDATA%\vary) and VARY_RELEASE_URL can override defaults.
Manual install
If you prefer not to pipe to iex, you can install manually:
1. Download varyup
$varyBin = "$env:LOCALAPPDATA\vary\bin"
mkdir $varyBin -ErrorAction SilentlyContinue
Invoke-WebRequest "https://github.com/ccollicutt/vary/releases/latest/download/varyup-windows-x64.exe" -OutFile "$varyBin\varyup.exe"
2. Verify checksum
$sums = (Invoke-WebRequest "https://github.com/ccollicutt/vary/releases/latest/download/SHA256SUMS" -UseBasicParsing).Content
$expected = (($sums -split "`n") | Where-Object { $_ -match "varyup-windows-x64.exe$" }) -split "\s+" | Select-Object -First 1
$actual = (Get-FileHash "$varyBin\varyup.exe" -Algorithm SHA256).Hash.ToLower()
if ($actual -ne $expected) { Write-Error "Checksum mismatch! Expected $expected, got $actual" }
else { Write-Host "Checksum verified" }
If the check fails, delete the binary and retry the download.
3. Add to PATH
$varyBin = "$env:LOCALAPPDATA\vary\bin"
$path = [Environment]::GetEnvironmentVariable("Path", "User")
if ($path -notlike "*$varyBin*") {
[Environment]::SetEnvironmentVariable("Path", "$path;$varyBin", "User")
$env:Path += ";$varyBin"
}
Or add %LOCALAPPDATA%\vary\bin through Settings > System > About > Advanced system settings > Environment Variables > User Path.
Open a new terminal and install a toolchain:
varyup toolchain install latest
Managing toolchains
List available versions:
varyup toolchain list-available
Install a specific version:
varyup toolchain install <version>
Short aliases are available:
varyup tc la # list-available
varyup tc i # install
Run varyup with no arguments to see all commands and aliases.
Install VS Code extension
Each toolchain bundles the Vary VS Code extension. Install it with:
varyup vscode install
See VS Code for full extension documentation.
Next steps
| Action | Link |
|---|---|
| Manage versions, update, pin per-project | varyup |
| Write your first program | Getting Started |
Run vary test on examples | Testing |
Run vary mutate on examples | Mutation testing |