forked from moke/spaceapi-tuerpie-nix
Compare commits
3 Commits
344dabf250
...
df2a35f4d3
Author | SHA1 | Date |
---|---|---|
Alexander Böhm | df2a35f4d3 | |
Alexander Böhm | af91ec61c9 | |
Alexander Böhm | f16bc27499 |
|
@ -0,0 +1,5 @@
|
|||
[target.armv7-unknown-linux-musleabi]
|
||||
linker = "arm-linux-gnueabi-gcc"
|
||||
|
||||
[target.armv7-unknown-linux-musleabihf]
|
||||
linker = "arm-linux-gnueabihf-gcc"
|
|
@ -12,3 +12,6 @@ log = "0.4.20"
|
|||
rppal = "0.14.1"
|
||||
spaceapi-dezentrale-client = { git = "https://github.com/dezentrale/spaceapi-rs.git", package = "spaceapi-dezentrale-client", branch = "main" }
|
||||
tokio = { version = "1.35.1", features = ["macros"] }
|
||||
|
||||
[profile.release]
|
||||
strip = true
|
||||
|
|
22
README.md
22
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
|
||||
```
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[toolchain]
|
||||
channel = "stable"
|
||||
targets = ["armv7-unknown-linux-musleabihf"]
|
||||
profile = "default"
|
Loading…
Reference in New Issue