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
Now the best way to ensure that you have successfully prepared a computer for Substrate
106
+
development is to follow the steps in [our first Substrate tutorial](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/).
107
+
108
+
## Troubleshooting Substrate builds
109
+
110
+
Sometimes you can't get the Substrate node template
111
+
to compile out of the box. Here are some tips to help you work through that.
112
+
113
+
### Rust configuration check
114
+
115
+
To see what Rust toolchain you are presently using, run:
116
+
117
+
```bash
118
+
rustup show
119
+
```
120
+
121
+
This will show something like this (Ubuntu example) output:
122
+
123
+
```text
124
+
Default host: x86_64-unknown-linux-gnu
125
+
rustup home: /home/user/.rustup
126
+
127
+
installed toolchains
128
+
--------------------
129
+
130
+
stable-x86_64-unknown-linux-gnu (default)
131
+
nightly-2020-10-06-x86_64-unknown-linux-gnu
132
+
nightly-x86_64-unknown-linux-gnu
133
+
134
+
installed targets for active toolchain
135
+
--------------------------------------
136
+
137
+
wasm32-unknown-unknown
138
+
x86_64-unknown-linux-gnu
139
+
140
+
active toolchain
141
+
----------------
142
+
143
+
stable-x86_64-unknown-linux-gnu (default)
144
+
rustc 1.50.0 (cb75ad5db 2021-02-10)
145
+
```
146
+
147
+
As you can see above, the default toolchain is stable, and the
148
+
`nightly-x86_64-unknown-linux-gnu` toolchain as well as its `wasm32-unknown-unknown` target is installed.
149
+
You also see that `nightly-2020-10-06-x86_64-unknown-linux-gnu` is installed, but is not used unless explicitly defined as illustrated in the [specify your nightly version](#specifying-nightly-version)
150
+
section.
151
+
152
+
### WebAssembly compilation
153
+
154
+
Substrate uses [WebAssembly](https://webassembly.org) (Wasm) to produce portable blockchain
155
+
runtimes. You will need to configure your Rust compiler to use
156
+
[`nightly` builds](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) to allow you to
157
+
compile Substrate runtime code to the Wasm target.
158
+
159
+
> There are upstream issues in Rust that need to be resolved before all of Substrate can use the stable Rust toolchain.
160
+
> [This is our tracking issue](https://github.com/paritytech/substrate/issues/1252) if you're curious as to why and how this will be resolved.
161
+
162
+
#### Latest nightly for Substrate `master`
163
+
164
+
Developers who are building Substrate _itself_ should always use the latest bug-free versions of
165
+
Rust stable and nightly. This is because the Substrate codebase follows the tip of Rust nightly,
166
+
which means that changes in Substrate often depend on upstream changes in the Rust nightly compiler.
167
+
To ensure your Rust compiler is always up to date, you should run:
0 commit comments