From c10bb979cfe54d7b87b23a8b3753235aa925cef6 Mon Sep 17 00:00:00 2001 From: AndrePanin Date: Mon, 15 Apr 2024 17:09:37 +0200 Subject: [PATCH] Change rust toolchain to stable (#649) Co-authored-by: Dmitry Novikov --- docs/examples/prerequisites.mdx | 7 ++++--- docs/getting-started-in-5-minutes.md | 16 +++++----------- docs/node/setting-up.mdx | 26 +++++++++++++------------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/docs/examples/prerequisites.mdx b/docs/examples/prerequisites.mdx index 8f84a60c2..7f0723e76 100644 --- a/docs/examples/prerequisites.mdx +++ b/docs/examples/prerequisites.mdx @@ -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` @@ -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 ``` @@ -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 | diff --git a/docs/getting-started-in-5-minutes.md b/docs/getting-started-in-5-minutes.md index 9b99f64a3..eb37f4549 100644 --- a/docs/getting-started-in-5-minutes.md +++ b/docs/getting-started-in-5-minutes.md @@ -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 @@ -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: @@ -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" ``` diff --git a/docs/node/setting-up.mdx b/docs/node/setting-up.mdx index bcb287c30..d3021c17d 100644 --- a/docs/node/setting-up.mdx +++ b/docs/node/setting-up.mdx @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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