Rust MQTT Client for Raspberry PI
-
git clone https://github.com/raspberrypi/tools.git
-
export PATH="~/foo/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin:$PATH"
-
Edit your cargo config :
sudo nano ~/.cargo/config
Paste this into the file:
[target.arm-uknown-linux-gnueabihf]
linker=arm-linux-gnueabihf-gcc
Save file : Ctrl + O, Ctrl + X
-
Add rust target for arm :
rustup add target arm-unknown-linux-gnueabihf
-
Build for arm target :
cargo build --target arm-unknown-linux-gnueabihf
-
Copy
/../foo/<project name>/target/arm-unknown-linux-gnueabihf/debug/<project name>
to rpi -
Execute