forked from Rockbox/rockbox
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.dev
More file actions
35 lines (30 loc) · 929 Bytes
/
Copy pathDockerfile.dev
File metadata and controls
35 lines (30 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM rust:1.95-trixie AS builder
ARG TARGETARCH
# Runtime deps for cpal (ALSA) and other libs
RUN apt-get update && apt-get install -y \
build-essential \
libunwind-dev \
libasound2-dev \
libdbus-1-dev \
protobuf-compiler \
curl \
wget \
zip \
unzip \
cmake
# Install Zig 0.16.0
RUN case "${TARGETARCH}" in \
amd64) ZIG_ARCH="x86_64" ;; \
arm64) ZIG_ARCH="aarch64" ;; \
*) echo "Unsupported arch: ${TARGETARCH}" && exit 1 ;; \
esac && \
export VERSION=0.16.0 && \
wget "https://ziglang.org/download/${VERSION}/zig-${ZIG_ARCH}-linux-${VERSION}.tar.xz" && \
tar -xf "zig-${ZIG_ARCH}-linux-${VERSION}.tar.xz" && \
mv "zig-${ZIG_ARCH}-linux-${VERSION}" /usr/local/zig && \
ln -s /usr/local/zig/zig /usr/local/bin/zig
COPY . /app
WORKDIR /app
# Build the C firmware library only — run cargo + zig builds interactively
WORKDIR /app/build-lib
RUN make lib -j$(nproc)