I recently acquired a Raspberry PI 2 and I want to run a Rust program on it.
Is there a guide/instructions how to cross compile Rust programs on Raspberry PI 2? I\'ve h
The Rust compiler is not distributed as a cross-compiler for the Raspberry Pi, so it needs to be compiled as a cross compiler with rpi dev tools.
Get rpi dev tools - git clone https://github.com/raspberrypi/tools.git ~/pi-tools
get rust compiler from mozilla git repo and add rpi tools to the path export PATH=~/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
Look for rusty-pi dir on your home ./configure --target=arm-unknown-linux-gnueabihf --prefix=$HOME/rusty-pi && make && make install
Considering helloworld.rs -> % ~/pi-rust/bin/rustc --target=arm-unknown-linux-gnueabihf -C linker=arm-linux-gnueabihf-g++ helloworld.rs
It will produce an executable.