Skip to content

Instantly share code, notes, and snippets.

@jdunkerley
Last active May 8, 2025 20:03
Show Gist options
  • Save jdunkerley/b1c859605d2f9ce816ad36df28c4b24e to your computer and use it in GitHub Desktop.
Save jdunkerley/b1c859605d2f9ce816ad36df28c4b24e to your computer and use it in GitHub Desktop.
Set up a Windows 10 machine from empty to ready to build Enso

Enable Developer Mode in Settings

  • Search for Developer and choose Use Developer features.
  • Inside System / For Developers
  • Ensure Developer Mode is turned on.

Install latest Powershell

winget install --id Microsoft.Powershell --source winget

Open Powershell 7 (or later) as admin (pwsh)

## Install Git, NVM, MSVC, Rust
winget install --id 7zip.7zip
winget install --id Git.Git
winget install --id GitHub.cli
winget install --id Microsoft.VisualStudioCode
winget install --id Microsoft.WindowsTerminal
winget install --id Microsoft.VisualStudio.2022.Community --silent --override "--wait --quiet --addProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
winget install --id CoreyButler.NVMforWindows
winget install --id Rustlang.Rustup
winget install --id sbt.sbt

Restart Powershell 7

Invoke-WebRequest -Uri https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_windows-x64_bin.zip -OutFile graalvm.zip
Expand-Archive graalvm.zip .
Remove-Item graalvm.zip
Invoke-WebRequest -Uri https://github.com/google/flatbuffers/releases/download/v24.3.25/Windows.flatc.binary.zip -OutFile flatc.zip
Expand-Archive flatc.zip flatbuffers
Remove-Item flatc.zip
$javaHome=(Get-ChildItem graalvm*).fullname
$flatcHome=(Get-ChildItem flatbuff*).fullname
$msvc=(Get-ChildItem "$Env:Programfiles\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\").Name
$winsdk=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\Include\").FullName
$winlib=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\Lib\").FullName
$winunion=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\UnionMetadata\").FullName
$winref=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\References\").FullName
setx PATH "$env:path;%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\bin\Hostx64\x64;%ProgramFiles%\7-zip\;$javaHome\bin;$flatcHome" -m
setx INCLUDE "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\include;$winsdk\ucrt;$winsdk\shared;$winsdk\um;$winsdk\winrt;$winsdk\cppwinrt" -m
setx LIB "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\lib\x64;$winlib\ucrt\x64;$winlib\um\x64" -m
setx LIBPATH "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\lib\x64;%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\lib\x64\store;$winunion;$winref" -m
setx JAVA_HOME "$javaHome" -m
setx ENSO_JVM_PATH "$javaHome" -m

setx might need to be run as an Adminstrator.

As Administrator enable long paths

git config --global core.longpaths true
git config --global core.symlinks true

Restart Powershell 7 (pwsh) in Terminal if prefered

nvm install lts
nvm use lts
rustup toolchain install stable
cargo +stable install wasm-pack
cargo +stable install cargo-watch
git config --global core.eol lf
git config --global core.autocrlf input
git clone https://github.com/enso-org/enso.git
cd enso
git submodule update --init

Create a .bazelrc file in User home

# Use different drive letter if needed, but the path must be SHORT
startup --output_base=C:/bazel
common --disk_cache=C:/bazel-disk
common --repository_cache=C:/bazel-repo

Need to create an environment variable to tell BAZEL to use Git Bash.

setx BAZEL_SH "C:\Program Files\Git\bin\bash.exe" -m

To build the project manager and libraries

Inside the enso directory, run:

sbt buildProjectManagerDistribution
sbt buildEngineDistribution

Set up symlink

Using powershell within the root of the enso repo, run:

New-Item -ItemType Directory -Path "$env:LOCALAPPDATA/enso/dist/" -Force
New-Item -ItemType SymbolicLink -Path "$env:LOCALAPPDATA/enso/dist/0.0.0-dev" -Target ".\built-distribution\enso-engine-0.0.0-dev-windows-amd64\enso-0.0.0-dev"

To build and run the GUI in interactive

Run the project manager by running: .\built-distribution\enso-project-manager-0.0.0-dev-windows-amd64\enso\bin\project-manager.exe

corepack pnpm install
corepack pnpm -w dev:gui

You can install pnpm globally using winget install -e --id pnpm.pnpm if preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment