summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Richard <richardsoncusto@gmail.com>2021-10-13 16:29:44 -0300
committerLibravatar Richard <richardsoncusto@gmail.com>2022-01-19 17:40:17 -0300
commitf111b48d6a7d9ffd281f2b383b6239d7e1970761 (patch)
tree8b06059b3b6f9be712c8d7af74a4e908c513d9c9
parent79ac5bb890d2076e54d8cad031459a3f575a5110 (diff)
downloadiced-f111b48d6a7d9ffd281f2b383b6239d7e1970761.tar.gz
iced-f111b48d6a7d9ffd281f2b383b6239d7e1970761.tar.bz2
iced-f111b48d6a7d9ffd281f2b383b6239d7e1970761.zip
Add cross compilation targets for `armv7` and `aarch64`
-rw-r--r--Cross.toml7
-rw-r--r--docker/Dockerfile.aarch64-unknown-linux-gnu31
-rw-r--r--docker/Dockerfile.armv7-unknown-linux-gnueabihf31
3 files changed, 69 insertions, 0 deletions
diff --git a/Cross.toml b/Cross.toml
new file mode 100644
index 00000000..92e51543
--- /dev/null
+++ b/Cross.toml
@@ -0,0 +1,7 @@
+[target.armv7-unknown-linux-gnueabihf]
+image = "iced-rs/armv7"
+xargo = false
+
+[target.aarch64-unknown-linux-gnu]
+image = "iced-rs/aarch64"
+xargo = false \ No newline at end of file
diff --git a/docker/Dockerfile.aarch64-unknown-linux-gnu b/docker/Dockerfile.aarch64-unknown-linux-gnu
new file mode 100644
index 00000000..afcdc39d
--- /dev/null
+++ b/docker/Dockerfile.aarch64-unknown-linux-gnu
@@ -0,0 +1,31 @@
+FROM debian:buster
+
+RUN dpkg --add-architecture arm64 && \
+ apt-get update && \
+ apt-get install --assume-yes \
+ curl \
+ build-essential \
+ cmake \
+ g++-aarch64-linux-gnu \
+ git \
+ pkg-config \
+ libdbus-1-dev:arm64 \
+ libudev-dev:arm64 \
+ libxkbcommon-dev:arm64 \
+ libfontconfig1-dev:arm64
+
+RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
+ --default-toolchain stable \
+ --no-modify-path \
+ --profile minimal
+
+ENV RUSTUP_HOME=/root/.rustup \
+ CARGO_HOME=/root/.cargo \
+ PATH=/root/.cargo/bin:$PATH \
+ PKG_CONFIG_ALLOW_CROSS=1 \
+ PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig \
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
+ CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
+ RUST_TEST_THREADS=1
+
+RUN rustup target add aarch64-unknown-linux-gnu \ No newline at end of file
diff --git a/docker/Dockerfile.armv7-unknown-linux-gnueabihf b/docker/Dockerfile.armv7-unknown-linux-gnueabihf
new file mode 100644
index 00000000..35008acd
--- /dev/null
+++ b/docker/Dockerfile.armv7-unknown-linux-gnueabihf
@@ -0,0 +1,31 @@
+FROM debian:buster
+
+RUN dpkg --add-architecture armhf && \
+ apt-get update && \
+ apt-get install --assume-yes \
+ curl \
+ build-essential \
+ cmake \
+ g++-arm-linux-gnueabihf \
+ git \
+ pkg-config \
+ libdbus-1-dev:armhf \
+ libudev-dev:armhf \
+ libxkbcommon-dev:armhf \
+ libfontconfig1-dev:armhf
+
+RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
+ --default-toolchain stable \
+ --no-modify-path \
+ --profile minimal
+
+ENV RUSTUP_HOME=/root/.rustup \
+ CARGO_HOME=/root/.cargo \
+ PATH=/root/.cargo/bin:$PATH \
+ PKG_CONFIG_ALLOW_CROSS=1 \
+ PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig \
+ CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
+ CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
+ RUST_TEST_THREADS=1
+
+RUN rustup target add armv7-unknown-linux-gnueabihf \ No newline at end of file