diff --git a/CROSS_COMPILE.md b/CROSS_COMPILE.md new file mode 100644 index 0000000000000000000000000000000000000000..3c7bbcb5804804442329e0e6820be2f9ea2965ae --- /dev/null +++ b/CROSS_COMPILE.md @@ -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 diff --git a/Cargo.lock b/Cargo.lock index a658ee2b8481350b2667cb8091766d131451f171..6fed2afffb0ffe57c86f96986a536043777acb0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", ] diff --git a/Cargo.toml b/Cargo.toml index 2126e42786c3420de58fbc92017e73c1c891cdab..acab8d076634fce011dfd4d3a7f1efea2b23d325 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"