Skip to content

Commit

Permalink
Merge pull request #60 from codecrafters-io/rust1.77
Browse files Browse the repository at this point in the history
CC-1120: Rust 1.77 upgrade
  • Loading branch information
ryan-gang authored Apr 9, 2024
2 parents e910836 + aff0248 commit 7f095ec
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compiled_starters/rust/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 Rust version used to run your code
# on Codecrafters.
#
# Available versions: rust-1.76
language_pack: rust-1.76
# Available versions: rust-1.77
language_pack: rust-1.77
20 changes: 20 additions & 0 deletions dockerfiles/rust-1.77.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM rust:1.77-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-grep-target

RUN cargo clean -p grep-starter-rust --release --target-dir=/tmp/codecrafters-grep-target

RUN rm -rf /app/src

RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cargo build --release --target-dir=/tmp/codecrafters-grep-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh
RUN chmod +x /codecrafters-precompile.sh

ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock"

4 changes: 2 additions & 2 deletions solutions/rust/01-init/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 Rust version used to run your code
# on Codecrafters.
#
# Available versions: rust-1.76
language_pack: rust-1.76
# Available versions: rust-1.77
language_pack: rust-1.77
4 changes: 2 additions & 2 deletions starter_templates/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ language_pack: c-9.2
language_pack: ruby-3.2
{{/ language_is_ruby }}
{{# language_is_rust }}
# Available versions: rust-1.76
language_pack: rust-1.76
# Available versions: rust-1.77
language_pack: rust-1.77
{{/ language_is_rust }}
{{# language_is_haskell }}
# Available versions: haskell-9.2
Expand Down

0 comments on commit 7f095ec

Please sign in to comment.