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: Wednesday 29 April 2026 @ 11:05:00

Installing Rust

  1. To install the correct version of rust we need to get which platform/architecture for our BeagleBone

    Terminal

    uname -m
    

    Tip

    You should check what each command does, run man uname to see more

  2. Take the output, armv7l, to https://forge.rust-lang.org/infra/other-installation-methods.html and find the arm7 stable binary.

    Important

    Rust has a 6 and 12 week release cycle, so you may have a different version number.

    View latest release notes here:

    and for release cycle info here:

  3. Once you have found the binary, right click and copy link to the tar.xz file. Go to the terminal and reproduce the following command to send stream the binary download over ssh to the BeagleBone:

    Terminal

    curl -L 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"
    

    You will be prompted for the password.

    Note

    The reason we are streaming over ssh is because the university machines user space storage is smaller than the binary. If you are connected with your device, you should still do the same command, remember the BeagleBone does not have internet access.

    What do gnueabi and gnueabihf actually mean?

    On ARM Linux, the suffix eabi refers to the Embedded Application Binary Interface (ABI), the low-level contract that defines how functions are called, how data is passed, and how binaries interact with the system.

    The key difference here is how floating-point operations are handled:

    • gnueabi (soft-float)

      • Floating-point calculations are performed in software
      • Values are passed via general-purpose registers
      • Works on older CPUs without a floating-point unit (FPU)
    • gnueabihf (hard-float)

      • Floating-point calculations use the CPU’s hardware FPU (e.g. VFP/NEON)
      • Values are passed via dedicated floating-point registers
      • Requires OS and libraries compiled for hard-float

    These are ABI-incompatible, a program built for one cannot run on the other.

    In practice:

    • gnueabi → maximum compatibility
    • gnueabihf → better performance (modern ARM systems)

    This distinction applies to all compiled languages, not just Rust.

  4. Now you can ssh into the BeagleBone, and run the following commands:

    Terminal

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

    Warning

    If you see something like this, don’t worry:

    tar: rust-1.95.0-armv7-unknown-linux-gnueabihf/clippy-preview/bin/cargo-clippy: time stamp 2026-04-14 19:55:32 is 27801247.138258174 s in the future
    

    This means that the file inside the archive has a modification time later than your system clock on the target.

    You can verify by running:

    /usr/bin/date
    
  5. Verify installation by running which rustc cargo, it should return the installation path and therefore it is include in the $PATH.

  6. Now let’s make sure we can run a program. Create a directory called rust with a file called main.rs

    Terminal

    mkdir rust && touch rust/main.rs
    
  7. Open rust/main.rs with nano and reproduce:

    Code

    fn main(){
        println!("Hello world!")
    }
    
  8. Save and exit, and then build the program

    Terminal

    rustc main.rs
    

    Note

    I am in the same directory as main.rs

  9. Now you should be able to go ./main and the terminal should should “Hello World!”