picontrol-rs
Rust version of the PiControl driver for the Revolution Pi
How to generate the Rust FFI bindings to C
-
Use bindgen binary directly:
TARGET=armv7-unknown-linux-gnueabihf
-
Use bindgen with a build.rs file
Rust cross-compilation
Cross project with Docker
See: https://github.com/rust-embedded/cross
Same operating system
See: https://medium.com/@wizofe/cross-compiling-rust-for-arm-e-g-raspberry-pi-using-any-os-11711ebfc52b
Configure Cargo for cross-compilation
# > should not be included when pasting
# you may need to install this on Ubuntu 18.06
You can now compile: