# Install Rust

{% embed url="<https://odysee.com/@ChainToolsAcademy:b/RustInstall:e>" %}
Video demonstrates steps described below.
{% endembed %}

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

#### Environment

Once Rust is installed environment has to be modified, so binaries can be found.

```bash
source $HOME/.cargo/env
```

Content of $HOME/.cargo/env looks like:

```bash
#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac
```

### Update Rust

```bash
rustup update nightly && rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
```

### Install wasm-pack

```bash
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chaintools.tech/home/readme/install-rust.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
