Compiled on RPI3B with 5.10.77-piCore-v8 Reference: https://www.linuxfromscratch.org/blfs/view/svn/general/rust.html Requires a few gigs of swap space Compile Flags: None --> assigning flags actually increase the overall size 313.3M --> 356.8M Dependencies: python3.8 compiletc cmake curl-dev libssh2-dev clang llvm-dev ninja pigz # not required, just to speed up the extraction time tar # not required, just to speed up the extraction time Commands: /usr/local/bin/tar -I pigz -xf rustc-1.59.0-src.tar.gz cd rustc-1.59.0-src cp ../config.toml . sudo busybox cp -f /tmp/tcloop/llvm-dev/usr/local/bin/llvm-config /usr/local/bin PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export PATH RUSTFLAGS='-C link-args=-lffi' SSL_CERT_FILE=/usr/local/etc/ssl/certs/ca-certificates.crt LIBSSH2_SYS_USE_PKG_CONFIG=1 export RUSTFLAGS SSL_CERT_FILE LIBSSH2_SYS_USE_PKG_CONFIG time python3 ./x.py build --exclude src/tools/miri &> /tmp/rust-build.log && \ DESTDIR=/tmp/packing-rust time python3 ./x.py install &> /tmp/rust-install.log # takes around 26~27 hours on pi3 / 5~6 hours on pi4 cd /tmp/packing-rust # remove doc man rm -fr ./usr/local/share/[dm][oa][cn] find -type f -exec file {} ';' > /tmp/file.info grep 'current ar archive' /tmp/file.info | cut -d : -f 1 | xargs llvm-strip --strip-debug grep ELF /tmp/file.info | cut -d : -f 1 | xargs llvm-strip --strip-unneeded