From 8deb648f8938fcc11d3b7fb58358af1c0ff41f50 Mon Sep 17 00:00:00 2001 From: Cat McGee Date: Sat, 28 Oct 2023 13:32:43 +0100 Subject: [PATCH 1/2] update windows installation --- .../getting_started/00_nargo_installation.md | 27 +++++++------------ .../getting_started/00_nargo_installation.md | 27 +++++++------------ 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/docs/docs/getting_started/00_nargo_installation.md b/docs/docs/getting_started/00_nargo_installation.md index 26a665a0d51..4ff5fc46334 100644 --- a/docs/docs/getting_started/00_nargo_installation.md +++ b/docs/docs/getting_started/00_nargo_installation.md @@ -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. @@ -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 @@ -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 diff --git a/docs/versioned_docs/version-0.17.0/getting_started/00_nargo_installation.md b/docs/versioned_docs/version-0.17.0/getting_started/00_nargo_installation.md index 26a665a0d51..4ff5fc46334 100644 --- a/docs/versioned_docs/version-0.17.0/getting_started/00_nargo_installation.md +++ b/docs/versioned_docs/version-0.17.0/getting_started/00_nargo_installation.md @@ -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. @@ -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 @@ -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 From 20afaa7c6b33343cb5b8fbe32490b763e82641f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Sun, 29 Oct 2023 14:36:07 +0000 Subject: [PATCH 2/2] chore(docs): adding clarification for unsupported BB for Windows --- docs/docs/getting_started/00_nargo_installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting_started/00_nargo_installation.md b/docs/docs/getting_started/00_nargo_installation.md index 4ff5fc46334..802c8380239 100644 --- a/docs/docs/getting_started/00_nargo_installation.md +++ b/docs/docs/getting_started/00_nargo_installation.md @@ -220,7 +220,7 @@ Advanced: If you aren't using direnv nor launching your editor within the subshe ### 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. +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.