You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/Starknet/modules/quick-start/pages/environment-setup.adoc
+65-77Lines changed: 65 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,71 +1,73 @@
1
1
[id="setup"]
2
2
= Setting up your environment
3
3
4
-
In order to interact with Starknet and compile Cairo code, you need to install several tools.
4
+
== Overview
5
5
6
-
The following tools are recommended to begin developing on Starknet:
6
+
In order to use Starknet, you need to install several tools. This section will walk you through installing the three most recommended tools to begin developing on Starknet:
7
7
8
-
[cols="1,1,1,1"]
9
-
[%autowidth.stretch]
10
-
|===
11
-
|Tool name | Description | Documentation |Code Repository
8
+
* xref:tools:devtools/clis.adoc#starkli[Starkli], a command-line interface that allows you to interact with Starknet.
12
9
13
-
|Starkli
14
-
|A command-line interface that allows you to interact with Starknet.
* xref:tools:devtools/smart-contract-tools.adoc#starknet_foundry[Starknet Foundry], the go-to framework for building and testing Starknet Smart Contracts
22
13
23
-
|Starknet Foundry
24
-
|The go to framework for building, and testing Starknet Smart Contracts.
To review all Starknet developer tools, check out the xref:tools:devtools/overview.adoc[tools and resources section].
30
15
31
16
[#installing_starkli]
32
-
== Installing Starkli
17
+
== Setting up Starkli
18
+
19
+
=== MacOS and Linux installation
33
20
34
-
The steps for installing Starkli and upgrading Starkli are identical.
21
+
It is highly recommended to install Starkli on MacOS and Linux using the link:https://get.starkli.sh[`starkliup` portable script]. `starkliup` manages shell configuration for you, and using any other installation method requires to link:https://book.starkli.rs/shell-completions[manually set up shell completions].
35
22
36
23
.Procedure
37
24
38
-
. Install Starkliup, the installer for the Starkli environment:
25
+
. Download `starkliup`:
39
26
+
40
27
[source,shell]
41
28
----
42
29
curl https://get.starkli.sh | sh
43
30
----
31
+
32
+
. Restart the terminal and install Starkli:
44
33
+
45
-
Starkliup should now be installed.
34
+
[source,shell]
35
+
----
36
+
starkliup
37
+
----
46
38
47
-
. Restart the terminal.
39
+
. Restart the terminal and verify that Starkli is installated correctly:
40
+
+
41
+
[source,shell]
42
+
----
43
+
starkli --version
44
+
----
45
+
46
+
=== Windows installation
47
+
48
+
Starknet Foundry's installation on Windows requires manually setting up shell completions.
Scarb is compatible with macOS, Linux, and Windows operating systems.
92
-
91
+
== Setting up Scarb
93
92
94
93
=== MacOS and Linux installation
95
94
96
-
It is highly recommended to install Scarb via the link:https://asdf-vm.com/[`asdf`] version manager.
97
-
98
-
Installing Scarb with `asdf` seamlessly integrates with the Cairo xref:tools:devtools/vscode.adoc[Cairo VSCode extension], and allows to easily switch between different versions of Scarb, globally or per project.
95
+
It is highly recommended to install Scarb on MacOS and Linux via the link:https://asdf-vm.com/[`asdf` version manager]. Installing Scarb with `asdf` seamlessly integrates with the Cairo xref:tools:devtools/vscode.adoc[Cairo VSCode extension], and allows to easily switch between different versions of Scarb, both globally and per project (see full details in the link:https://asdf-vm.com/manage/commands.html[`asdf` documentation] or by running `asdf --help`).
99
96
100
97
.Procedure
101
98
102
-
. Follow the installation steps of `asdf` on the link:https://asdf-vm.com/guide/getting-started.html[official website].
99
+
. Verify that `asdf` is installed:
103
100
+
101
+
[source, bash]
102
+
----
103
+
asdf --version
104
+
----
105
+
+
106
+
or install it by following the instructions in the link:https://asdf-vm.com/guide/getting-started.html[`asdf` documentation].
104
107
105
-
. Install the Scarb plugin:
108
+
. Install the `asdf` Scarb plugin:
106
109
+
107
110
[source, bash]
108
111
----
109
112
asdf plugin add scarb
110
113
----
111
114
112
-
. Install the latest version of Scarb
115
+
. Install the latest version of Scarb:
113
116
+
114
117
[source, bash]
115
118
----
116
119
asdf install scarb latest
117
120
----
118
121
119
-
120
-
. Set a global version for Scarb
122
+
. Restart the terminal and verify that Scarb is installed correctly:
121
123
+
122
124
[source, bash]
123
125
----
124
-
asdf global scarb latest
126
+
scarb --version
125
127
----
126
128
127
-
128
-
. Check if Scarb is installed correctly
129
+
. Set a global version for Scarb (need for using `scarb init`):
129
130
+
130
131
[source, bash]
131
132
----
132
-
scarb --version
133
+
asdf global scarb latest
133
134
----
134
135
135
-
You should see the version of Scarb, Cairo and Sierra.
136
-
137
-
[TIP]
138
-
====
139
-
See additional commands for updating Scarb and switching between versions in the link:https://asdf-vm.com/manage/commands.html[`asdf` documentation], or by running `asdf --help`.
140
-
====
141
-
142
-
143
-
144
136
=== Windows installation
145
137
146
138
Scarb's installation on Windows requires manual setup.
147
139
148
140
.Procedure
149
141
150
-
. Follow the steps in the link:https://docs.swmansion.com/scarb/download.html#windows[Scarb documentation].
151
-
. Restart the terminal and run the following command to verify the installation:
142
+
. Follow the instructions in the link:https://docs.swmansion.com/scarb/download.html#windows[Scarb documentation].
143
+
144
+
. Restart the terminal and verify that Scarb is installed correctly:
152
145
+
153
146
[source, bash]
154
147
----
155
148
scarb --version
156
149
----
157
150
158
-
Scarb should now be installed.
159
-
160
151
[#starknet_foundry_setup]
161
152
== Setting up Starknet Foundry
162
153
163
-
// Starknet Foundry is the go to framework for building, and testing Starknet Smart Contracts.
164
-
165
-
=== Installing Starknet Foundry on MacOS and Linux
154
+
=== MacOS and Linux installation
166
155
167
-
Although other options are possible, it is highly recommended to install Starknet Foundry using the link:https://asdf-vm.com/[`asdf` version manager]. Installing Starknet Foundry with `asdf` allows to easily switch between different versions of Starknet Foundry, both globally and per project.
156
+
It is highly recommended to install Starknet Foundry on MacOS and Linux using the link:https://asdf-vm.com/[`asdf` version manager]. Installing Starknet Foundry with `asdf` allows to easily switch between different versions of Starknet Foundry, both globally and per project (see full details in the link:https://asdf-vm.com/manage/commands.html[`asdf` documentation] or by running `asdf --help`).
168
157
169
158
.Procedure
170
159
@@ -174,7 +163,7 @@ Although other options are possible, it is highly recommended to install Starkne
// . Set a global version for Starknet Foundry using `asdf`:
188
-
// +
189
-
// [source, bash]
190
-
// ----
191
-
// asdf global starknet-foundry latest
192
-
// ----
193
-
176
+
. Set a global version for Starknet Foundry using `asdf` (need for using `scarb init`):
177
+
+
178
+
[source, bash]
179
+
----
180
+
asdf global starknet-foundry latest
181
+
----
194
182
195
-
. Verify that Starknet Foundry is installed correctly:
183
+
. Restart the terminal and verify that Starknet Foundry is installed correctly:
196
184
+
197
185
[source, bash]
198
186
----
199
187
snforge --version
200
188
sncast --version
201
189
----
202
190
203
-
=== Installing Starknet Foundry on Windows
191
+
=== Windows installation
204
192
205
193
Starknet Foundry's installation on Windows requires manual setup.
206
194
207
195
.Procedure
208
196
209
-
. Follow the steps in the link:https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html#installation-on-windows[Starknet Foundry documentation].
197
+
. Follow the instructions in the link:https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html#installation-on-windows[Starknet Foundry documentation].
210
198
. Restart the terminal and verify that Starknet Foundry is installed correctly:
0 commit comments