From f16bc2749990a075892aaf49fad82c9c68f5faaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20B=C3=B6hm?= Date: Fri, 5 Jan 2024 15:01:24 +0100 Subject: [PATCH] Added build instruction --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 128d527..e437764 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,25 @@ Please change `DOOR_PIN` accordingly. You need to provide the environment variables `SPACEAPI_URL` and `API_KEY`. + +## Build + +[Install stable version of rust](https://rustup.rs/) and run a regular cargo build: + +```sh +cargo build +``` + +### Cross compile + +Install arm toolchain and *libmusl* for static linked binaries: + +```sh +apt-get install gcc-arm-linux-gnueabihf musl-dev musl-tools +``` + +Build the application for raspberry pi: + +```sh +cargo build --target=armv7-unknown-linux-musleabihf +```