-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from codecrafters-io/CC-586
CC-586 add rust 1.70 support
- Loading branch information
Showing
10 changed files
with
45 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM rust:1.70-buster | ||
|
||
COPY Cargo.toml /app/Cargo.toml | ||
COPY Cargo.lock /app/Cargo.lock | ||
|
||
RUN mkdir /app/src | ||
RUN echo 'fn main() { println!("Hello World!"); }' > /app/src/main.rs | ||
|
||
WORKDIR /app | ||
RUN cargo build --release --target-dir=/tmp/codecrafters-redis-target | ||
|
||
RUN rm /tmp/codecrafters-redis-target/release/redis-starter-rust | ||
RUN rm /tmp/codecrafters-redis-target/release/redis-starter-rust.d | ||
|
||
RUN find /tmp/codecrafters-redis-target/release -type f -maxdepth 1 -delete | ||
RUN rm -f /tmp/codecrafters-redis-target/release/deps/*redis_starter_rust* | ||
RUN rm -f /tmp/codecrafters-redis-target/release/deps/redis_starter_rust* | ||
RUN rm -f /tmp/codecrafters-redis-target/release/.fingerprint/*redis_starter_rust* | ||
RUN rm -f /tmp/codecrafters-redis-target/release/.fingerprint/redis_starter_rust* | ||
|
||
RUN rm -rf /app/src | ||
|
||
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cargo build --release --target-dir=/tmp/codecrafters-redis-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh | ||
RUN chmod +x /codecrafters-precompile.sh | ||
|
||
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock" | ||
|
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
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
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