Skip to content

Commit fa4fc29

Browse files
Starkup installation docs (#3641)
<!-- Reference any GitHub issues resolved by this PR --> Closes #3216 ## Introduced changes <!-- A brief description of the changes --> - ## Checklist <!-- Make sure all of these are complete --> - [x] Linked relevant issue - [x] Updated relevant documentation - [x] Added relevant tests - [x] Performed self-review of the code - [x] Added changes to `CHANGELOG.md`
1 parent 1c71e24 commit fa4fc29

File tree

1 file changed

+45
-14
lines changed

1 file changed

+45
-14
lines changed

docs/src/getting-started/installation.md

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ In this section, we will walk through the process of installing Starknet Foundry
99

1010
* [Installation](#installation)
1111
* [Contents](#contents)
12-
* [Requirements](#requirements)
13-
* [Linux and macOS](#linux-and-macos)
14-
* [Install asdf](#install-asdf)
15-
* [Install Scarb version >= 2.8.5](#install-scarb-version--285)
16-
* [(Optional for Scarb >= 2.10.0) Rust Installation](#optional-for-scarb--21001-rust-installation)
17-
* [Install Starknet Foundry](#install-starknet-foundry)
18-
* [Windows](#windows)
12+
* [With Starkup](#with-starkup)
13+
* [Manual Installation](#manual-installation)
14+
* [Requirements](#requirements)
15+
* [Linux and macOS](#linux-and-macos)
16+
* [Install asdf](#install-asdf)
17+
* [Install Scarb version >= 2.8.5](#install-scarb-version--285)
18+
* [(Optional for Scarb >= 2.10.0) Rust Installation](#optional-for-scarb--21001-rust-installation)
19+
* [Install Starknet Foundry](#install-starknet-foundry)
20+
* [Windows](#windows)
1921
* [Common Errors](#common-errors)
2022
* [No Version Set (Linux and macOS Only)](#no-version-set-linux-and-macos-only)
2123
* [Invalid Rust Version](#invalid-rust-version)
@@ -29,7 +31,30 @@ In this section, we will walk through the process of installing Starknet Foundry
2931

3032
<!-- TOC -->
3133

32-
## Requirements
34+
## With Starkup
35+
36+
[Starkup](https://github.com/software-mansion/starkup) helps you install all the tools used to develop packages in Cairo and write contracts for Starknet, including Starknet Foundry.
37+
38+
> ℹ️ **Info**
39+
>
40+
> When using starkup on Windows, please
41+
> use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install), as it only works on macOS and Linux.
42+
43+
Run the following in your terminal, then follow the onscreen instructions:
44+
45+
```shell
46+
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh
47+
```
48+
49+
To verify that Starknet Foundry was installed, open a new terminal and run
50+
51+
```shell
52+
snforge --version
53+
```
54+
55+
## Manual Installation
56+
57+
### Requirements
3358

3459
> 📝 **Note**
3560
>
@@ -55,14 +80,14 @@ all installed and added to your `PATH` environment variable.
5580
> `Universal-Sierra-Compiler` will be automatically installed if you use `asdf` or `snfoundryup`.
5681
> You can also create `UNIVERSAL_SIERRA_COMPILER` env var to make it visible for `snforge`.
5782
58-
## Linux and macOS
83+
### Linux and macOS
5984

6085
> ℹ️ **Info**
6186
>
6287
> If you already have installed Rust, Scarb and asdf simply run
6388
> `asdf plugin add starknet-foundry`
6489
65-
### Install asdf
90+
#### Install asdf
6691

6792
Follow the instructions from [asdf docs](https://asdf-vm.com/guide/getting-started.html#getting-started).
6893

@@ -72,7 +97,7 @@ To verify that asdf was installed, run
7297
asdf --version
7398
```
7499

75-
### Install Scarb version >= 2.8.5
100+
#### Install Scarb version >= 2.8.5
76101

77102
First, add Scarb plugin to asdf
78103

@@ -100,7 +125,7 @@ scarb --version
100125

101126
and verify that version is >= 2.8.5
102127

103-
### (Optional for Scarb >= 2.10.0)[^note] Rust Installation
128+
#### (Optional for Scarb >= 2.10.0)[^note] Rust Installation
104129

105130
> ℹ️️ **Info**
106131
>
@@ -127,7 +152,7 @@ and verify that version is >= 1.80.1
127152

128153
See [Rust docs](https://doc.rust-lang.org/beta/book/ch01-01-installation.html#installation) for more details.
129154

130-
### Install Starknet Foundry
155+
#### Install Starknet Foundry
131156

132157
First, add Starknet Foundry plugin to asdf
133158

@@ -159,7 +184,7 @@ or
159184
sncast --version
160185
```
161186

162-
## Windows
187+
### Windows
163188

164189
> 🐧 **Info** - WSL (Windows Subsystem for Linux)
165190
>
@@ -234,6 +259,12 @@ test = "snforge test"
234259
235260
Shell completions allow your terminal to suggest and automatically complete commands and options when you press `Tab`.
236261
262+
> ⚠️ **Warning**
263+
>
264+
> Most users **DO NOT** need to install shell completions manually.
265+
> [Starkup](#install-via-starkup-installation-script) automatically set up shell completions for the supported shells.
266+
> However, if these installation methods do not support the target shell, or for any reason fail to set up completions, you can follow the instructions below to set them up manually.
267+
237268
<details>
238269
<summary><strong>Bash</strong></summary>
239270

0 commit comments

Comments
 (0)