Skip to content

Commit

Permalink
add cross compilation for linux x86 and arm and build script
Browse files Browse the repository at this point in the history
  • Loading branch information
CappeDiem committed Mar 20, 2024
1 parent 058c1ae commit 5f9bbf8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
name = "heartbeat-sender"
version = "0.1.0"
edition = "2021"

authors = ["CappeDiem"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dotenv = "0.15.0"
openssl = { version = "0.10.64", features = ["vendored"]}
reqwest = { version = "0.11.27", features = ["blocking"] }
5 changes: 5 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.armv7-unknown-linux-gnueabihf.env]
image= "armv7-unknown-linux-gnueabihf"

[target.x86_64-unknown-linux-gnu.env]
image = "x86_64-unknown-linux-gnu"
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cargo build --release
cross build --release --target armv7-unknown-linux-gnueabihf
cross build --release --target x86_64-unknown-linux-gnu

0 comments on commit 5f9bbf8

Please sign in to comment.