From b5de0321b33c91323aa805ff6ef39772f6c33ec0 Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Thu, 2 Apr 2026 04:38:22 +0900 Subject: [PATCH] CC-2189: Upgrade Rust to v1.94 --- compiled_starters/rust/Cargo.toml | 2 +- compiled_starters/rust/README.md | 2 +- compiled_starters/rust/codecrafters.yml | 4 ++-- dockerfiles/rust-1.94.Dockerfile | 13 +++++++++++++ solutions/rust/01-yy2/code/Cargo.toml | 2 +- solutions/rust/01-yy2/code/README.md | 2 +- solutions/rust/01-yy2/code/codecrafters.yml | 4 ++-- solutions/rust/02-aq1/code/Cargo.toml | 2 +- solutions/rust/02-aq1/code/README.md | 2 +- solutions/rust/02-aq1/code/codecrafters.yml | 4 ++-- starter_templates/rust/code/Cargo.toml | 2 +- starter_templates/rust/config.yml | 2 +- 12 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 dockerfiles/rust-1.94.Dockerfile diff --git a/compiled_starters/rust/Cargo.toml b/compiled_starters/rust/Cargo.toml index d46ce15..52c47db 100644 --- a/compiled_starters/rust/Cargo.toml +++ b/compiled_starters/rust/Cargo.toml @@ -3,7 +3,7 @@ name = "codecrafters-claude-code" version = "0.1.0" authors = ["Codecrafters "] edition = "2024" -rust-version = "1.93" +rust-version = "1.94" [dependencies] tokio = { version = "1", features = ["macros", "rt-multi-thread"] } # async runtime diff --git a/compiled_starters/rust/README.md b/compiled_starters/rust/README.md index b1de211..20d165d 100644 --- a/compiled_starters/rust/README.md +++ b/compiled_starters/rust/README.md @@ -27,7 +27,7 @@ codecrafters submit Note: This section is for stages 2 and beyond. -1. Ensure you have `cargo (1.93)` installed locally. +1. Ensure you have `cargo (1.94)` installed locally. 2. Run `./your_program.sh` to run your program, which is implemented in `src/main.rs`. This command compiles your Rust project, so it might be slow the first time you run it. Subsequent runs will be fast. diff --git a/compiled_starters/rust/codecrafters.yml b/compiled_starters/rust/codecrafters.yml index 76669bc..a9ec5a2 100644 --- a/compiled_starters/rust/codecrafters.yml +++ b/compiled_starters/rust/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Rust version used to run your code # on Codecrafters. # -# Available versions: rust-1.93 -buildpack: rust-1.93 \ No newline at end of file +# Available versions: rust-1.94 +buildpack: rust-1.94 \ No newline at end of file diff --git a/dockerfiles/rust-1.94.Dockerfile b/dockerfiles/rust-1.94.Dockerfile new file mode 100644 index 0000000..92d2c0e --- /dev/null +++ b/dockerfiles/rust-1.94.Dockerfile @@ -0,0 +1,13 @@ +# syntax=docker/dockerfile:1.7-labs +FROM rust:1.94-trixie + +# Rebuild the container if these files change +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock" + +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 cargo build +RUN .codecrafters/compile.sh diff --git a/solutions/rust/01-yy2/code/Cargo.toml b/solutions/rust/01-yy2/code/Cargo.toml index d46ce15..52c47db 100644 --- a/solutions/rust/01-yy2/code/Cargo.toml +++ b/solutions/rust/01-yy2/code/Cargo.toml @@ -3,7 +3,7 @@ name = "codecrafters-claude-code" version = "0.1.0" authors = ["Codecrafters "] edition = "2024" -rust-version = "1.93" +rust-version = "1.94" [dependencies] tokio = { version = "1", features = ["macros", "rt-multi-thread"] } # async runtime diff --git a/solutions/rust/01-yy2/code/README.md b/solutions/rust/01-yy2/code/README.md index b1de211..20d165d 100644 --- a/solutions/rust/01-yy2/code/README.md +++ b/solutions/rust/01-yy2/code/README.md @@ -27,7 +27,7 @@ codecrafters submit Note: This section is for stages 2 and beyond. -1. Ensure you have `cargo (1.93)` installed locally. +1. Ensure you have `cargo (1.94)` installed locally. 2. Run `./your_program.sh` to run your program, which is implemented in `src/main.rs`. This command compiles your Rust project, so it might be slow the first time you run it. Subsequent runs will be fast. diff --git a/solutions/rust/01-yy2/code/codecrafters.yml b/solutions/rust/01-yy2/code/codecrafters.yml index 76669bc..a9ec5a2 100644 --- a/solutions/rust/01-yy2/code/codecrafters.yml +++ b/solutions/rust/01-yy2/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Rust version used to run your code # on Codecrafters. # -# Available versions: rust-1.93 -buildpack: rust-1.93 \ No newline at end of file +# Available versions: rust-1.94 +buildpack: rust-1.94 \ No newline at end of file diff --git a/solutions/rust/02-aq1/code/Cargo.toml b/solutions/rust/02-aq1/code/Cargo.toml index d46ce15..52c47db 100644 --- a/solutions/rust/02-aq1/code/Cargo.toml +++ b/solutions/rust/02-aq1/code/Cargo.toml @@ -3,7 +3,7 @@ name = "codecrafters-claude-code" version = "0.1.0" authors = ["Codecrafters "] edition = "2024" -rust-version = "1.93" +rust-version = "1.94" [dependencies] tokio = { version = "1", features = ["macros", "rt-multi-thread"] } # async runtime diff --git a/solutions/rust/02-aq1/code/README.md b/solutions/rust/02-aq1/code/README.md index b1de211..20d165d 100644 --- a/solutions/rust/02-aq1/code/README.md +++ b/solutions/rust/02-aq1/code/README.md @@ -27,7 +27,7 @@ codecrafters submit Note: This section is for stages 2 and beyond. -1. Ensure you have `cargo (1.93)` installed locally. +1. Ensure you have `cargo (1.94)` installed locally. 2. Run `./your_program.sh` to run your program, which is implemented in `src/main.rs`. This command compiles your Rust project, so it might be slow the first time you run it. Subsequent runs will be fast. diff --git a/solutions/rust/02-aq1/code/codecrafters.yml b/solutions/rust/02-aq1/code/codecrafters.yml index 76669bc..a9ec5a2 100644 --- a/solutions/rust/02-aq1/code/codecrafters.yml +++ b/solutions/rust/02-aq1/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Rust version used to run your code # on Codecrafters. # -# Available versions: rust-1.93 -buildpack: rust-1.93 \ No newline at end of file +# Available versions: rust-1.94 +buildpack: rust-1.94 \ No newline at end of file diff --git a/starter_templates/rust/code/Cargo.toml b/starter_templates/rust/code/Cargo.toml index d46ce15..52c47db 100644 --- a/starter_templates/rust/code/Cargo.toml +++ b/starter_templates/rust/code/Cargo.toml @@ -3,7 +3,7 @@ name = "codecrafters-claude-code" version = "0.1.0" authors = ["Codecrafters "] edition = "2024" -rust-version = "1.93" +rust-version = "1.94" [dependencies] tokio = { version = "1", features = ["macros", "rt-multi-thread"] } # async runtime diff --git a/starter_templates/rust/config.yml b/starter_templates/rust/config.yml index fd04f54..068738f 100644 --- a/starter_templates/rust/config.yml +++ b/starter_templates/rust/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: cargo (1.93) + required_executable: cargo (1.94) user_editable_file: src/main.rs