Keyboard shortcuts

Press โ† or โ†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Last updated: Tuesday 17 November 2026 @ 16:11:41
BeagleBone Black ยท Revision D

Installing Rust

In this practical you will identify the BeagleBone Black's processor architecture, select a compatible Rust toolchain, transfer the installer over USB networking, and compile your first Rust programme directly on the BeagleBone Black.

RustARMv7LinuxSSHToolchain
Practical Checklist
Chapter checklist 0 / 6 completed

1. Identify the target architecture

  1. Connect to the BeagleBone Black over SSH, as in the Getting Started practical. On the BeagleBone, check its machine architecture:

    uname -m

    Expected result:

    armv7l

    uname -m reports the machine hardware architecture as described by the running Linux kernel. The l in armv7l denotes little-endian ARMv7.

  2. Use the result of uname -m to identify the correct Rust download target.

    uname -m returned armv7l. This establishes the processor architecture, but a compiler binary must also match the operating system and its application binary interface (ABI). Rust therefore uses a more descriptive identifier, called a target triple.

    For this BeagleBone Black, the mapping is:

    Linux architecture       Rust target
    armv7l            โ†’      armv7-unknown-linux-gnueabihf
    Target componentHow it relates to our BeagleBone
    armv7Matches the ARMv7 processor identified by uname -m; the l in armv7l indicates little-endian operation and is not included in Rust's architecture field
    unknownA generic vendor designation, not an unknown CPU
    linuxThe operating system running on the BeagleBone
    gnueabihfThe GNU/Linux hard-float ABI used by the board's Debian system libraries

    We will use this exact target name to select the archive in Section 2.

2. Obtain the standalone Rust installer

  1. On the computer, visit the Rust standalone installer downloads. Using the target triple derived from uname -m in Section 1, locate the stable .tar.xz archive for armv7-unknown-linux-gnueabihf.

    The example in this practical uses Rust 1.95.0. If you select a different version, substitute that same version number in the download URL and extracted directory name.

  2. On the computer, stream the installer directly to the BeagleBone using the USB-network SSH connectioni:

    curl -LO https://static.rust-lang.org/dist/rust-1.95.0-armv7-unknown-linux-gnueabihf.tar.xz | ssh debian@192.168.7.2 "cat > rust.tar.xz"
    curl -LO https://static.rust-lang.org/dist/rust-1.95.0-armv7-unknown-linux-gnueabihf.tar.xz 
    mv rust-1.95.0-armv7-unknown-linux-gnueabihf.tar.xz rust.tar.xz
    scp  rust.tar.xz debian@192.168.7.2:/home/debian/

3. Install Rust on the BeagleBone

  1. In your BeagleBone SSH session, extract the archive, enter its directory and run the included installer:

    tar xf rust.tar.xz
    cd rust-1.95.0-armv7-unknown-linux-gnueabihf
    sudo ./install.sh

    The standalone toolchain includes rustc, cargo, and standard Rust tooling. Unlike rustup, the standalone installer does not automatically manage future toolchain updates.

  2. Verify that the Rust compiler and Cargo are accessible from PATH:

    which rustc cargo

    Check their versions:

    rustc --version
    cargo --version