-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
77 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[target.aarch64-unknown-linux-gnu] | ||
dockerfile = "./ci/Dockerfile.aarch64-unknown-linux-gnu" | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
dockerfile = "./ci/Dockerfile.x86_64-unknown-linux-gnu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main@sha256:b4f5bf74812f9bb6516140d4b83d1f173c2d5ce0523f3e1c2253d99d851c734f | ||
|
||
ENV PKG_CONFIG_ALLOW_CROSS="true" | ||
|
||
RUN dpkg --add-architecture arm64 && \ | ||
apt-get update && \ | ||
apt-get install --assume-yes clang-8 libclang-8-dev binutils-aarch64-linux-gnu zlib1g-dev:arm64 unzip | ||
|
||
# INSTALL PROTOBUF | ||
ENV PROTOBUF_FILE_NAME=protoc-3.18.2-linux-x86_64.zip | ||
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.18.2/${PROTOBUF_FILE_NAME} | ||
ENV PROTOC_DIR=/usr/local/protoc | ||
RUN unzip ${PROTOBUF_FILE_NAME} -d ${PROTOC_DIR} | ||
RUN chmod -R a+xr ${PROTOC_DIR} | ||
ENV PROTOC=${PROTOC_DIR}/bin/protoc | ||
RUN rm ${PROTOBUF_FILE_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main@sha256:bf0cd3027befe882feb5a2b4040dc6dbdcb799b25c5338342a03163cea43da1b | ||
|
||
RUN apt-get update && \ | ||
apt-get install --assume-yes clang libclang-dev binutils-aarch64-linux-gnu unzip | ||
|
||
# INSTALL PROTOBUF | ||
ENV PROTOBUF_FILE_NAME=protoc-3.18.2-linux-x86_64.zip | ||
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.18.2/${PROTOBUF_FILE_NAME} | ||
RUN unzip ${PROTOBUF_FILE_NAME} -d /usr/local/protoc | ||
ENV PROTOC_DIR=/usr/local/protoc | ||
RUN unzip ${PROTOBUF_FILE_NAME} -d ${PROTOC_DIR} | ||
RUN chmod -R a+xr ${PROTOC_DIR} | ||
ENV PROTOC=${PROTOC_DIR}/bin/protoc | ||
RUN rm ${PROTOBUF_FILE_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Cross compilation | ||
|
||
We use [cross](https://github.com/cross-rs/cross) to work around [bug](https://github.com/rust-lang/rust-bindgen/issues/1229) in `bind-gen`. | ||
|
||
To test cross compilation locally: | ||
|
||
```bash | ||
cargo install cross | ||
cross build --target ${target} --bin dozer | ||
``` |