MEMO about Rust

インストール for raspberry pi

良く見るインストールのコマンドを実行すると、デフォルトでは64bit版をインストールしてしまう。 一見インストールできたかにみえるが、rustcコマンドを実行すると「No such file ・・・」としかならず、 コンパイルができない。 こうなったら一回アンインストールして、以下のようにカスタムインストールする。 ARM 32bit版を指定。 Other Installation Methodに書いてある。
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

・・・

Current installation options:


   default host triple: aarch64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>2

I'm going to ask you the value of each of these installation options.
You may simply press the Enter key to leave unchanged.

Default host triple?
armv7-unknown-linux-gnueabihf

Default toolchain? (stable/beta/nightly/none)
stable

Profile (which tools and data to install)? (minimal/default/complete)
default

Modify PATH variable? (y/n)
yes


Current installation options:


   default host triple: armv7-unknown-linux-gnueabihf
     default toolchain: stable
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1
インストールが終わったら、端末(LXTerminalなど、シェル)を再起動する。rustcコマンドを実行して、使い方が表示されればOK。