Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): Update Windows installation #3326

Merged
merged 3 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions docs/docs/getting_started/00_nargo_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ There are four approaches for installing Nargo:

- [Option 1: Noirup](#option-1-noirup)
- [Option 2: Binaries](#option-2-binaries)
- [Option 3: Install via Nix](#option-3-install-via-nix)
- [Option 4: Compile from Source](#option-4-compile-from-source)
- [Option 3: Compile from Source](#option-3-compile-from-source)
- [Option 4: WSL for Windows](#option-4-wsl-for-windows)

Optionally you can also install [Noir VS Code extension] for syntax highlighting.

Expand Down Expand Up @@ -98,21 +98,6 @@ echo '\nexport PATH=$PATH:$HOME/.nargo/bin' >> ~/.zshrc && \
source ~/.zshrc
```

##### Windows (PowerShell)

Open PowerShell as Administrator and run:

```powershell
mkdir -f -p "$env:USERPROFILE\.nargo\bin\"; `
Invoke-RestMethod -Method Get -Uri https://github.com/noir-lang/noir/releases/download/v0.4.1/nargo-x86_64-pc-windows-msvc.zip -Outfile "$env:USERPROFILE\.nargo\bin\nargo-x86_64-pc-windows-msvc.zip"; `
Expand-Archive -Path "$env:USERPROFILE\.nargo\bin\nargo-x86_64-pc-windows-msvc.zip" -DestinationPath "$env:USERPROFILE\.nargo\bin\"; `
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"; `
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path; `
$NewPath = $OldPath + ’;’ + "$env:USERPROFILE\.nargo\bin\"; `
Set-ItemProperty -Path "$Reg" -Name PATH –Value "$NewPath"; `
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
```

##### Linux (Bash)

```bash
Expand Down Expand Up @@ -233,6 +218,14 @@ If you have hesitations with using direnv, you can launch a subshell with `nix d

Advanced: If you aren't using direnv nor launching your editor within the subshell, you can try to install Barretenberg and other global dependencies the package needs. This is an advanced workflow and likely won't receive support!

### Option 4: WSL (for Windows)

The default backend for Noir (Barretenberg) doesn't provide Windows binaries at this time. For that reason, Noir cannot be installed nativerly. However, it is available by using Windows Subsystem for Linux (WSL).

Step 1: Follow the instructions [here](https://learn.microsoft.com/en-us/windows/wsl/install) to install and run WSL.

step 2: Follow the [Noirup instructions](#option-1-noirup).

## Uninstalling Nargo

### Noirup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ There are four approaches for installing Nargo:

- [Option 1: Noirup](#option-1-noirup)
- [Option 2: Binaries](#option-2-binaries)
- [Option 3: Install via Nix](#option-3-install-via-nix)
- [Option 4: Compile from Source](#option-4-compile-from-source)
- [Option 3: Compile from Source](#option-3-compile-from-source)
- [Option 4: WSL for Windows](#option-4-wsl-for-windows)

Optionally you can also install [Noir VS Code extension] for syntax highlighting.

Expand Down Expand Up @@ -98,21 +98,6 @@ echo '\nexport PATH=$PATH:$HOME/.nargo/bin' >> ~/.zshrc && \
source ~/.zshrc
```

##### Windows (PowerShell)

Open PowerShell as Administrator and run:

```powershell
mkdir -f -p "$env:USERPROFILE\.nargo\bin\"; `
Invoke-RestMethod -Method Get -Uri https://github.com/noir-lang/noir/releases/download/v0.4.1/nargo-x86_64-pc-windows-msvc.zip -Outfile "$env:USERPROFILE\.nargo\bin\nargo-x86_64-pc-windows-msvc.zip"; `
Expand-Archive -Path "$env:USERPROFILE\.nargo\bin\nargo-x86_64-pc-windows-msvc.zip" -DestinationPath "$env:USERPROFILE\.nargo\bin\"; `
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"; `
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path; `
$NewPath = $OldPath + ’;’ + "$env:USERPROFILE\.nargo\bin\"; `
Set-ItemProperty -Path "$Reg" -Name PATH –Value "$NewPath"; `
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
```

##### Linux (Bash)

```bash
Expand Down Expand Up @@ -233,6 +218,14 @@ If you have hesitations with using direnv, you can launch a subshell with `nix d

Advanced: If you aren't using direnv nor launching your editor within the subshell, you can try to install Barretenberg and other global dependencies the package needs. This is an advanced workflow and likely won't receive support!

### Option 4: WSL (for Windows)

Windows is not directly supported at this time. To install Noir on a Windows machine, it is recommended to use WSL.

Step 1: Follow the instructions [here](https://learn.microsoft.com/en-us/windows/wsl/install) to install and run WSL.

step 2: Follow the [Noirup instructions](#option-1-noirup).

## Uninstalling Nargo

### Noirup
Expand Down