Skip to content

Commit 9feb454

Browse files
feat: build and deploy app to raspberry pi
1 parent f01316f commit 9feb454

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

actix_hello_world/.cargo/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.armv7-unknown-linux-gnueabihf]
2+
linker = "arm-linux-gnueabihf-gcc"

actix_hello_world/deploy

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o xtrace
6+
7+
8+
readonly TARGET_PATH=/home/pi/actix_hello_world
9+
readonly TARGET_ARCH=armv7-unknown-linux-gnueabihf
10+
readonly SOURCE_PATH=./target/${TARGET_ARCH}/release/actix_hello_world
11+
12+
cargo build --release --target=${TARGET_ARCH}
13+
rsync ${SOURCE_PATH} ${TARGET_HOST}:${TARGET_PATH}
14+
ssh -t ${TARGET_HOST} ${TARGET_PATH}

0 commit comments

Comments
 (0)