-
Notifications
You must be signed in to change notification settings - Fork 160
sdk-rs - toolchain setup page & Rust version #1156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e3dafe3
sdk-rs - toolchain setup page
51fcc8d
sdk-rs - add rust versions to a table
887744d
sdk-rs - change rust versions
5b57d15
sdk-rs - add note about wasmer6
e879c87
rename with rust version
b7204e5
rust version redirect
andrei-marinica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| --- | ||
| id: toolchain-setup | ||
| title: Toolchain Setup | ||
| --- | ||
|
|
||
| [comment]: # (mx-context-auto) | ||
|
|
||
| ## Installing Rust and sc-meta | ||
|
|
||
| :::note | ||
| `sc-meta` is universal smart contract management tool. Please follow [this](/developers/meta/sc-meta) for more information. | ||
| ::: | ||
|
|
||
| [comment]: # (mx-context-auto) | ||
|
|
||
| For systems running Ubuntu or Windows with WSL, you should first ensure the following system-level dependencies required by Rust and sc-meta are in place: | ||
|
|
||
| ```bash | ||
| sudo apt-get install build-essential pkg-config libssl-dev | ||
| ``` | ||
|
|
||
| Install Rust as recommended on [rust-lang.org](https://www.rust-lang.org/tools/install): | ||
|
|
||
| ```bash | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
| ``` | ||
|
|
||
| Then, choose **Proceed with installation (default)**. | ||
|
|
||
| :::tip | ||
| Generally speaking, you should install Rust `v1.85.0` (stable channel) or later. | ||
| ::: | ||
|
|
||
| ```bash | ||
| rustup update | ||
| rustup default stable | ||
| ``` | ||
|
|
||
| Afterwards, open a new terminal (shell) and install `sc-meta`: | ||
|
|
||
| ```bash | ||
| cargo install multiversx-sc-meta --locked | ||
| ``` | ||
|
|
||
| Once `sc-meta` is ready, install the `wasm32` target (for the Rust compiler), `wasm-opt`, and others dependencies as follows: | ||
|
|
||
| ```bash | ||
| # Installs `wasm32`, `wasm-opt`, and others in one go: | ||
| sc-meta install all | ||
|
|
||
| cargo install twiggy | ||
| ``` | ||
|
|
||
| [comment]: # (mx-context-auto) | ||
|
|
||
| ### Within Continuous Integration / Continuous Delivery | ||
|
|
||
| For automated environments like CI/CD pipelines, start by installing the necessary foundational libraries. On platforms such as Ubuntu (or WSL), this means installing: | ||
|
|
||
| ```bash | ||
| sudo apt-get install build-essential pkg-config libssl-dev | ||
| ``` | ||
|
|
||
| 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 stable -y | ||
|
|
||
| cargo install multiversx-sc-meta --locked | ||
|
|
||
| sc-meta install wasm32 | ||
| ``` | ||
|
|
||
| [comment]: # (mx-context-auto) | ||
|
|
||
| ## Check your Rust installation | ||
|
|
||
| You can check your Rust installation by invoking `rustup show`: | ||
|
|
||
| ```sh | ||
| $ rustup show | ||
|
|
||
| Default host: x86_64-unknown-linux-gnu | ||
| rustup home: /home/ubuntu/.rustup | ||
|
|
||
| installed toolchains | ||
| -------------------- | ||
| stable-x86_64-unknown-linux-gnu (default) | ||
| [...] | ||
|
|
||
| active toolchain | ||
| ---------------- | ||
| name: stable-x86_64-unknown-linux-gnu | ||
| installed targets: | ||
| wasm32-unknown-unknown | ||
| wasm32v1-none | ||
| x86_64-unknown-linux-gnu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.