Skip to content

Commit b3d10a2

Browse files
committed
chore(git): add android cargo build
1 parent b9d018a commit b3d10a2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:22.04
22

33
# Set environment variables for the Android SDK and NDK, and the API level.
4-
ENV ANDROID_API_LEVEL="27"
4+
ENV ANDROID_API_LEVEL="22"
55
ENV ANDROID_NDK_VERSION=r26d
66
ENV ANDROID_SDK_ROOT="/usr/lib/android-sdk"
77
ENV ANDROID_HOME="/usr/lib/android-sdk"
@@ -83,6 +83,13 @@ RUN echo "=== SETTING UP CARGO CONFIG ===" && \
8383
echo '' >> /root/.cargo/config.toml && \
8484
cat /root/.cargo/config.toml
8585

86+
# Configure Rust to abort on panic (no libunwind needed)
87+
RUN echo '[profile.dev]' >> /root/.cargo/config.toml && \
88+
echo 'panic = "abort"' >> /root/.cargo/config.toml && \
89+
echo '' >> /root/.cargo/config.toml && \
90+
echo '[profile.release]' >> /root/.cargo/config.toml && \
91+
echo 'panic = "abort"' >> /root/.cargo/config.toml
92+
8693
# Test with Cargo
8794
RUN echo "=== TESTING WITH CARGO ===" && \
8895
mkdir -p src && \

0 commit comments

Comments
 (0)