1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[2546],{72588(n,e,i){i.r(e),i.d(e,{assets:()=>t,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"installation","title":"Installation","description":"There are different ways to install Nargo, the one-stop shop and command-line tool for developing Noir programs. This guide explains how to specify which version to install when using noirup, and using WSL for windows.","source":"@site/versioned_docs/version-v1.0.0-rc.2/installation.md","sourceDirName":".","slug":"/installation","permalink":"/docs/installation","draft":false,"unlisted":false,"editUrl":"https://github.com/noir-lang/noir/edit/master/docs/versioned_docs/version-v1.0.0-rc.2/installation.md","tags":[],"version":"v1.0.0-rc.2","frontMatter":{"title":"Installation","description":"There are different ways to install Nargo, the one-stop shop and command-line tool for developing Noir programs. This guide explains how to specify which version to install when using noirup, and using WSL for windows.","keywords":["Installation Nargo Noirup Binaries Compiling from Source WSL for Windows macOS Linux Uninstalling Nargo"]},"sidebar":"sidebar","previous":{"title":"Getting Started Manually","permalink":"/docs/getting_started_manually"},"next":{"title":"Crates and Packages","permalink":"/docs/project_structure/crates_and_packages"}}');var r=i(74848),o=i(28453);const l={title:"Installation",description:"There are different ways to install Nargo, the one-stop shop and command-line tool for developing Noir programs. This guide explains how to specify which version to install when using noirup, and using WSL for windows.",keywords:["Installation Nargo Noirup Binaries Compiling from Source WSL for Windows macOS Linux Uninstalling Nargo"]},a=void 0,t={},c=[{value:"Installing Noirup",id:"installing-noirup",level:3},{value:"Fetching Binaries",id:"fetching-binaries",level:3},{value:"Compiling from Source",id:"compiling-from-source",level:3},{value:"Installation on Windows",id:"installation-on-windows",level:2},{value:"Setting up shell completions",id:"setting-up-shell-completions",level:2},{value:"Uninstalling Nargo",id:"uninstalling-nargo",level:2}];function d(n){const e={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.p,{children:"Noirup is the endorsed method for installing Nargo, streamlining the process of fetching binaries or compiling from source. It supports a range of options to cater to your specific needs, from nightly builds and specific versions to compiling from various sources."}),"\n",(0,r.jsx)(e.h3,{id:"installing-noirup",children:"Installing Noirup"}),"\n",(0,r.jsxs)(e.p,{children:["First, ensure you have ",(0,r.jsx)(e.code,{children:"noirup"})," installed:"]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash\n"})}),"\n",(0,r.jsx)(e.h3,{id:"fetching-binaries",children:"Fetching Binaries"}),"\n",(0,r.jsxs)(e.p,{children:["With ",(0,r.jsx)(e.code,{children:"noirup"}),", you can easily switch between different Nargo versions, including nightly builds:"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Nightly Version"}),": Install the latest nightly build."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --version nightly\n"})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Specific Version"}),": Install a specific version of Nargo."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --version <version>\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"compiling-from-source",children:"Compiling from Source"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"noirup"})," also enables compiling Nargo from various sources:"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"From a Specific Branch"}),": Install from the latest commit on a branch."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --branch <branch-name>\n"})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"From a Fork"}),": Install from the main branch of a fork."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --repo <username/repo>\n"})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"From a Specific Branch in a Fork"}),": Install from a specific branch in a fork."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --repo <username/repo> --branch <branch-name>\n"})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"From a Specific Pull Request"}),": Install from a specific PR."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --pr <pr-number>\n"})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"From a Specific Commit"}),": Install from a specific commit."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup -C <commit-hash>\n"})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"From Local Source"}),": Compile and install from a local directory."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-sh",children:"noirup --path ./path/to/local/source\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"installation-on-windows",children:"Installation on Windows"}),"\n",(0,r.jsx)(e.p,{children:"The default backend for Noir (Barretenberg) doesn't provide Windows binaries at this time. For that reason, Noir cannot be installed natively. However, it is available by using Windows Subsystem for Linux (WSL)."}),"\n",(0,r.jsxs)(e.p,{children:["Step 1: Follow the instructions ",(0,r.jsx)(e.a,{href:"https://learn.microsoft.com/en-us
1/windows/wsl/install",children:"here"})," to install and run WSL."]}),"\n",(0,r.jsxs)(e.p,{children:["Step 2: Follow the ",(0,r.jsx)(e.a,{href:"#installing-noirup",children:"Noirup instructions"}),"."]}),"\n",(0,r.jsx)(e.h2,{id:"setting-up-shell-completions",children:"Setting up shell completions"}),"\n",(0,r.jsxs)(e.p,{children:["Once ",(0,r.jsx)(e.code,{children:"nargo"})," is installed, you can ",(0,r.jsx)(e.a,{href:"/docs/tooling/shell_completions",children:"set up shell completions for it"}),"."]}),"\n",(0,r.jsx)(e.h2,{id:"uninstalling-nargo",children:"Uninstalling Nargo"}),"\n",(0,r.jsxs)(e.p,{children:["If you installed Nargo with ",(0,r.jsx)(e.code,{children:"noirup"}),", you can uninstall Nargo by removing the files in ",(0,r.jsx)(e.code,{children:"~/.nargo"}),", ",(0,r.jsx)(e.code,{children:"~/nargo"}),", and ",(0,r.jsx)(e.code,{children:"~/noir_cache"}),". This ensures that all installed binaries, configurations, and cache related to Nargo are fully removed from your system."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"rm -r ~/.nargo\nrm -r ~/nargo\nrm -r ~/noir_cache\n"})})]})}function h(n={}){const{wrapper:e}={...(0,o.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(d,{...n})}):d(n)}},28453(n,e,i){i.d(e,{R:()=>l,x:()=>a});var s=i(96540);const r={},o=s.createContext(r);function l(n){const e=s.useContext(o);return s.useMemo(function(){return"function"==typeof n?n(e):{...e,...n}},[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:l(n.components),s.createElement(o.Provider,{value:e},n.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.