Raspberry Pi に Rust をインストール

環境

pi@pi:~/package $ uname -a
Linux pi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux
pi@pi:~/package $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

1. Rust Install

pi@pi:~/package $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /home/pi/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

  /home/pi/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  /home/pi/.cargo/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /home/pi/.profile
  /home/pi/.bashrc

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


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

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

info: profile set to 'default'
info: default host triple is armv7-unknown-linux-gnueabihf
info: syncing channel updates for 'stable-armv7-unknown-linux-gnueabihf'
info: latest update on 2022-12-15, rust version 1.66.0 (69f9c33d7 2022-12-12)
info: downloading component 'cargo'
  6.1 MiB /   6.1 MiB (100 %)   4.9 MiB/s in  2s ETA:  0s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 19.0 MiB /  19.0 MiB (100 %)  10.1 MiB/s in  2s ETA:  0s
info: downloading component 'rust-std'
 26.9 MiB /  26.9 MiB (100 %)   8.6 MiB/s in  4s ETA:  0s
info: downloading component 'rustc'
 80.4 MiB /  80.4 MiB (100 %)   9.8 MiB/s in  9s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
  6.1 MiB /   6.1 MiB (100 %)   5.0 MiB/s in  1s ETA:  0s
info: installing component 'clippy'
info: installing component 'rust-docs'
 19.0 MiB /  19.0 MiB (100 %)   1.8 MiB/s in 20s ETA:  0s
info: installing component 'rust-std'
 26.9 MiB /  26.9 MiB (100 %)   4.4 MiB/s in 11s ETA:  0s
info: installing component 'rustc'
 80.4 MiB /  80.4 MiB (100 %)   4.6 MiB/s in 18s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-armv7-unknown-linux-gnueabihf'

  stable-armv7-unknown-linux-gnueabihf installed - rustc 1.66.0 (69f9c33d7 2022-12-12)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source "$HOME/.cargo/env"