Browse Source

docs: cross compile

cross-compile
Timo Kösters 1 week ago
parent
commit
151ef07fb3
Signed by: timo <timo@koesters.xyz> GPG Key ID: 24DA7517711A2BA4
3 changed files with 24 additions and 0 deletions
  1. +13
    -0
      CROSS_COMPILE.md
  2. +10
    -0
      Cargo.lock
  3. +1
    -0
      Cargo.toml

+ 13
- 0
CROSS_COMPILE.md View File

@@ -0,0 +1,13 @@
Install docker:

$ sudo apt install docker
$ sudo usermod -aG docker $USER

Then log out and back in.

$ sudo systemctl start docker

$ cargo install cross
$ cross build --release --features tls_vendored --target armv7-unknown-linux-musleabihf

The cross-compiled binary is at target/armv7-unknown-linux-musleabihf/release/conduit

+ 10
- 0
Cargo.lock View File

@@ -1136,6 +1136,15 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"

[[package]]
name = "openssl-src"
version = "111.12.0+1.1.1h"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "858a4132194f8570a7ee9eb8629e85b23cbc4565f2d4a162e87556e5956abf61"
dependencies = [
"cc",
]

[[package]]
name = "openssl-sys"
version = "0.9.58"
@@ -1145,6 +1154,7 @@ dependencies = [
"autocfg",
"cc",
"libc",
"openssl-src",
"pkg-config",
"vcpkg",
]


+ 1
- 0
Cargo.toml View File

@@ -62,6 +62,7 @@ trust-dns-resolver = "0.19.5"
[features]
default = ["conduit_bin"]
conduit_bin = [] # TODO: add rocket to this when it is optional
tls_vendored = ["reqwest/native-tls-vendored"]

[[bin]]
name = "conduit"


Loading…
Cancel
Save