Allow cross compilation

This commit is contained in:
Austen Adler 2021-08-09 23:13:23 -04:00
parent 48b3ea2e01
commit 03aef246c1
2 changed files with 13 additions and 1 deletions

12
.cargo/config Normal file
View File

@ -0,0 +1,12 @@
# For cross compilation
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
[target.armv7-unknown-linux-musleabi]
linker = "arm-linux-gnueabi-gcc"
[target.arm-unknown-linux-musleabi]
linker = "arm-linux-gnueabi-gcc"
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

View File

@ -4,7 +4,7 @@ build:
cargo build --target=armv7-unknown-linux-gnueabihf cargo build --target=armv7-unknown-linux-gnueabihf
deploy: build deploy: build
scp ./target/armv7-unknown-linux-gnueabihf/debug/aw-lights pi: scp ./target/armv7-unknown-linux-gnueabihf/debug/aw-lights pi:aw-lights-bin
run: deploy run: deploy
ssh pi ./aw-lights ssh pi ./aw-lights