Skip to content

Commit

Permalink
Merge pull request #901 from multiversx/rust-update-1
Browse files Browse the repository at this point in the history
Reference a newer Rust (nightly / stable)
  • Loading branch information
andreibancioiu authored May 29, 2024
2 parents 5dd06fc + a1118a2 commit 95d23b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
6 changes: 2 additions & 4 deletions docs/sdk-and-tools/sdk-py/configuring-mxpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ In order to view the current configuration, one can issue the command `mxpy conf

```
{
"dependencies.llvm.tag": "v...",
"dependencies.vmtools.tag": "v...",
"dependencies.rust.tag": ""
}
```
Expand All @@ -31,6 +29,6 @@ In order to view the current configuration, one can issue the command `mxpy conf

One can alter the current configuration using the command `mxpy config set`. For example, in order to set the **_rust version_** to be used, one would do the following:

```
$ mxpy config set dependencies.rust.tag nightly-2023-12-11
```bash
$ mxpy config set dependencies.rust.tag stable
```
21 changes: 13 additions & 8 deletions docs/sdk-and-tools/troubleshooting/rust-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,15 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then, choose **Proceed with installation (default)**.

Once Rust is installed, open a new terminal (shell), then switch to a nightly version and install the `wasm32-unknown-unknown` target:
Once Rust is installed, open a new terminal (shell), then switch to a recent stable version and install the `wasm32-unknown-unknown` target:

:::tip
Generally speaking, you should install Rust `v1.78.0` (stable channel) or later, or `nightly-2024-05-22` (nightly channel) or later.
:::

```bash
rustup default nightly-2023-12-11
rustup update
rustup default stable
rustup target add wasm32-unknown-unknown
```

Expand Down Expand Up @@ -141,7 +146,7 @@ For CI / CD, install Rust as follows:
```bash
wget -O rustup.sh https://sh.rustup.rs && \
chmod +x rustup.sh && \
./rustup.sh --verbose --default-toolchain nightly-2023-12-11 --target wasm32-unknown-unknown -y
./rustup.sh --verbose --default-toolchain stable --target wasm32-unknown-unknown -y

cargo install multiversx-sc-meta --locked
```
Expand Down Expand Up @@ -174,7 +179,7 @@ installed toolchains
--------------------
[...]
nightly-2023-12-11-x86_64-unknown-linux-gnu (default)
stable-x86_64-unknown-linux-gnu (default)
installed targets for active toolchain
--------------------------------------
Expand All @@ -186,19 +191,19 @@ active toolchain
----------------
[...]
nightly-2023-12-11-x86_64-unknown-linux-gnu (default)
stable-x86_64-unknown-linux-gnu (default)
```

You can also check the status of your Rust installation using `mxpy`:

```
```bash
$ mxpy deps check rust

INFO cli.deps: Checking dependency: module = rust, tag = nightly-2023-12-11
INFO cli.deps: Checking dependency: module = rust, tag = stable
INFO modules: which rustc: /home/ubuntu/.cargo/bin/rustc
INFO modules: which cargo: /home/ubuntu/.cargo/bin/cargo
INFO modules: which sc-meta: /home/ubuntu/.cargo/bin/sc-meta
INFO modules: which wasm-opt: /home/ubuntu/.cargo/bin/wasm-opt
INFO modules: which twiggy: /home/ubuntu/.cargo/bin/twiggy
INFO cli.deps: [rust nightly-2023-12-11] is installed.
INFO cli.deps: [rust stable] is installed.
```

0 comments on commit 95d23b5

Please sign in to comment.