Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiled_starters/zig/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Zig version used to run your code
# on Codecrafters.
#
# Available versions: zig-0.15
buildpack: zig-0.15
# Available versions: zig-0.15.2
buildpack: zig-0.15.2
30 changes: 30 additions & 0 deletions dockerfiles/zig-0.15.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# syntax=docker/dockerfile:1.7-labs
FROM debian:bookworm

RUN apt-get update && \
apt-get install --no-install-recommends -y xz-utils=5.4.1-1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Download and install Zig
RUN curl -O https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz \
&& tar -xf zig-x86_64-linux-0.15.2.tar.xz \
&& mv zig-x86_64-linux-0.15.2 /usr/local/zig \
&& rm zig-x86_64-linux-0.15.2.tar.xz

# Add Zig to PATH
ENV PATH="/usr/local/zig:${PATH}"

ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="build.zig,build.zig.zon"

WORKDIR /app

# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
COPY --exclude=.git --exclude=README.md . /app

# This runs zig build
RUN .codecrafters/compile.sh

# Cache build directory
RUN mkdir -p /app-cached
RUN mv /app/.zig-cache /app-cached/.zig-cache || true
4 changes: 2 additions & 2 deletions solutions/zig/01-dr6/code/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Zig version used to run your code
# on Codecrafters.
#
# Available versions: zig-0.15
buildpack: zig-0.15
# Available versions: zig-0.15.2
buildpack: zig-0.15.2
Loading