Skip to content

Commit

Permalink
chore(docs): Update Windows installation (noir-lang#3326)
Browse files Browse the repository at this point in the history
Co-authored-by: José Pedro Sousa <[email protected]>
Co-authored-by: José Pedro Sousa <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2023
1 parent 964b777 commit 7d126c5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 34 deletions.
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

0 comments on commit 7d126c5

Please sign in to comment.