docs: cross compile

This commit is contained in:
Timo Kösters 2020-10-18 08:48:31 +02:00
parent f56b463278
commit 151ef07fb3
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 24 additions and 0 deletions

13
CROSS_COMPILE.md Normal file
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
Cargo.lock generated
View file

@ -1136,6 +1136,15 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 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]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.58" version = "0.9.58"
@ -1145,6 +1154,7 @@ dependencies = [
"autocfg", "autocfg",
"cc", "cc",
"libc", "libc",
"openssl-src",
"pkg-config", "pkg-config",
"vcpkg", "vcpkg",
] ]

View file

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