I'm writing these notes in case they help others.
The SBC4 is not very powerful. If your program is small enough and with close-to-zero dependencies, you can install a rust compiler there simply follow instructions on the official website. Compiling will be a bit slow, but for small projects it's enough.
However, for a more complex program, you need to cross-compile it, i.e. use the power of another more powerful computer to create an executable for the SBC, then copy the executable to the SBC and simply run it there.
There's a tool called cross that helps with this. It internally creates a container for the target platform, automatically runs the compilation inside the container and generates the executable that you will be able to run on the SBC4.
After installing it as in the official guide,
compile the project for the SBC4 architecture with this:
Code: Select all
cross build --target armv7-unknown-linux-gnueabihf --release
Hope it helps someone