Skip to content

Commit

Permalink
Change rust toolchain to stable (#649)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry Novikov <novikov.dm.al@gmail.com>
  • Loading branch information
AndrePanin and breathx authored Apr 15, 2024
1 parent 9b3e6a2 commit c10bb97
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
7 changes: 4 additions & 3 deletions docs/examples/prerequisites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ All program examples and JS applications have been tested on a stable environmen

You may configure a local development environment according to the information provided below or use a pre-configured Docker image as described in the [Using Docker](#using-docker) section.

Current stable release: `v1.1.1`
Current stable release: `v1.2.1`

<table>
<tr>
Expand Down Expand Up @@ -56,8 +56,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
Add Wasm target to your toolchain:
```bash
rustup toolchain add nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup target add wasm32-unknown-unknown
```
</td>
</tr>
Expand Down Expand Up @@ -125,6 +124,8 @@ It is highly recommended to use Linux or macOS for compiling Gear node and progr

| Gear node version | Runtime version | Gear libraries version | Rust toolchain version |
| ----------------- | --------------- | ---------------------- | ---------------------- |
| v1.2.1 | 1210 | tag = "v1.2.1" | stable |
| v1.1.1 | 1110 | tag = "v1.1.1" | stable |
| v1.0.5 | 1050 | tag = "v1.0.5" | nightly-2023-09-18 |
| v1.0.2 | 1020 | tag = "v1.0.2" | nightly-2023-10-14 |
| v1.0.1 | 1010 | tag = "v1.0.1" | nightly-2023-10-14 |
Expand Down
16 changes: 5 additions & 11 deletions docs/getting-started-in-5-minutes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,13 @@ This guide provides a general overview of running programs on the networks power
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

3. Install a `nightly` version of the toolchain with `rustup`, since Gear uses the most up-to-date features `rustup` provides. `nightly-2023-09-18` is the latest version compatible with Gear.
3. A Wasm compiler is necessary for compiling a Rust program to Wasm, add it to the toolchain.

```bash
rustup toolchain add nightly-2023-09-18
rustup target add wasm32-unknown-unknown
```

4. Aa Wasm compiler is necessary for compiling a Rust program to Wasm, add it to the toolchain.

```bash
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-09-18
```

5. Install the `wasm-proc` utility that optimizes compiled Wasm to be more compact.
4. Install the `wasm-proc` utility that optimizes compiled Wasm to be more compact.

```bash
cargo install --locked --git https://github.com/gear-tech/gear.git wasm-proc
Expand Down Expand Up @@ -141,7 +135,7 @@ This guide provides a general overview of running programs on the networks power
```bash
RUSTFLAGS="-C link-args=--import-memory -C linker-plugin-lto" \
cargo +nightly-2023-09-18 build --release --target=wasm32-unknown-unknown
cargo build --release --target=wasm32-unknown-unknown
```
This command is quite verbose, so you can create cargo config and Rust toolchain override files to make it shorter. Create a `.cargo/config.toml` file in the `counter` directory with the following contents:
Expand All @@ -159,7 +153,7 @@ This guide provides a general overview of running programs on the networks power
```toml
[toolchain]
channel = "nightly-2023-09-18"
channel = "stable"
targets = ["wasm32-unknown-unknown"]
profile = "default"
```
Expand Down
26 changes: 13 additions & 13 deletions docs/node/setting-up.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ Depending on your OS you need to download the last release build of Gear node fr
Terminal:
```bash
curl https://get.gear.rs/gear-v1.1.1-x86_64-unknown-linux-gnu.tar.xz | tar xJ
curl https://get.gear.rs/gear-v1.2.1-x86_64-unknown-linux-gnu.tar.xz | tar xJ
```
or
**Linux x86-64**: [gear-v1.1.1-x86_64-unknown-linux-gnu.tar.xz](https://get.gear.rs/gear-v1.1.1-x86_64-unknown-linux-gnu.tar.xz)
**Linux x86-64**: [gear-v1.2.1-x86_64-unknown-linux-gnu.tar.xz](https://get.gear.rs/gear-v1.2.1-x86_64-unknown-linux-gnu.tar.xz)
Run the node:
```
❯ ./gear --version
gear 1.1.1-33ee05d5aab
gear 1.2.1-a218853
```
</TabItem>
Expand All @@ -55,18 +55,18 @@ gear 1.1.1-33ee05d5aab
Terminal:
```bash
curl https://get.gear.rs/gear-v1.1.1-aarch64-apple-darwin.tar.xz | tar xJ
curl https://get.gear.rs/gear-v1.2.1-aarch64-apple-darwin.tar.xz | tar xJ
```
or
**macOS ARM**: [gear-v1.1.1-aarch64-apple-darwin.tar.xz](https://get.gear.rs/gear-v1.1.1-aarch64-apple-darwin.tar.xz)
**macOS ARM**: [gear-v1.2.1-aarch64-apple-darwin.tar.xz](https://get.gear.rs/gear-v1.2.1-aarch64-apple-darwin.tar.xz)
You can try to run the node:
```
❯ ./gear --version
gear 1.1.1-33ee05d5aab
gear 1.2.1-a218853
```
</TabItem>
Expand All @@ -75,18 +75,18 @@ gear 1.1.1-33ee05d5aab
Terminal:
```bash
curl https://get.gear.rs/gear-v1.1.1-x86_64-apple-darwin.tar.xz | tar xJ
curl https://get.gear.rs/gear-v1.2.1-x86_64-apple-darwin.tar.xz | tar xJ
```
or
**macOS x86-64**: [gear-v1.1.1-x86_64-apple-darwin.tar.xz](https://get.gear.rs/gear-v1.1.1-x86_64-apple-darwin.tar.xz)
**macOS x86-64**: [gear-v1.2.1-x86_64-apple-darwin.tar.xz](https://get.gear.rs/gear-v1.2.1-x86_64-apple-darwin.tar.xz)
You can try to run the node:
```
❯ ./gear --version
gear 1.1.1-33ee05d5aab
gear 1.2.1-a218853
```
</TabItem>
Expand All @@ -96,18 +96,18 @@ gear 1.1.1-33ee05d5aab
Terminal:
```bash
curl -O https://get.gear.rs/gear-v1.1.1-x86_64-pc-windows-msvc.zip
curl -O https://get.gear.rs/gear-v1.2.1-x86_64-pc-windows-msvc.zip
```
or
**Windows x86-64**: [gear-v1.1.1-x86_64-pc-windows-msvc.zip](https://get.gear.rs/gear-v1.1.1-x86_64-pc-windows-msvc.zip)
**Windows x86-64**: [gear-v1.2.1-x86_64-pc-windows-msvc.zip](https://get.gear.rs/gear-v1.2.1-x86_64-pc-windows-msvc.zip)
Unzip the downloaded package then you can try to run the node:
```
❯ gear.exe --version
gear.exe 1.1.1-d02d306f97c
gear.exe 1.2.1-a218853
```
</TabItem>
Expand Down Expand Up @@ -171,7 +171,7 @@ rustup target add wasm32-unknown-unknown --toolchain nightly
git clone https://github.com/gear-tech/gear.git
cd gear
# Checkout to the latest release tag
git checkout v1.1.1 -b release-1.1.1
git checkout v1.2.1 -b release-1.2.1
```

:::info
Expand Down

0 comments on commit c10bb97

Please sign in to comment.