Installing Rust in a Raspberry Pi 3A+
Need Documenetation Guide On How To Build Rust On Raspberry Pi With armv7-unknown-linux-musleabihf Platform
path - Fail to run cargo after install rust on raspberry pi 4 - Stack Overflow
Raspberry Pi 4 Rust installation broken.
This may be related to clippy and rustfmt now being default components. You should try the minimal profile of rustup: https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html
More on reddit.comVideos
I have got myself a new Raspberry Pi 3A+ to do some Rust development for this platform. At the moment I am interested in writing some code for this Display-O-Tron hat. So I have started by installing Rust on the Raspberry OS 64bits (Lite, since I only ssh to the machine. No XWindows) using rustup.
My awesome Raspberry Pi 3A+ in its aluminium case and with a Display-O-Tron hatTo my surprise the installation failed twice. To be completely honest, I didn't pay much attention to the output, but when I did, the third time, I realized that rustc had failed to install because the task to take care of the installation had been killed without finishing. A couple of Google searches and another attempt later I learned that the problem was that rustup was consuming all of the available memory and, hence, failing to finish. The Raspberry Pi 3A+ only has 512MB of memory, but still. I believe that running out of memory when uncompressing the downloaded files is a little bit excessive. Keep in mind that the same process works perfectly fine in a Raspberry Pi Zero W that is a less powerful device with the same amount of memory, but running the 32bit version of the same OS.
Don't get me wrong, please. This ain't a rant against rustup. I love the tool and really appreciate all the work behind it. I am just curious about your opinion on whether we should push to have an installer that is more benevolent. This has been reported before, but the conclusion was that 512MB was too tight for Rust development. What do you think?
Spoiler alert: If you run upon the same problem you can increase the swap size (512MB worked fine for me) at the price of punishing your SDCard. Instructions to do so can be found here.
Another spoiler alert: if you run the installation with RUSTUP_IO_THREADS set to 1, as suggested by u/kryps, it also works flawlessly.