Skip to content

Commit 804a5b1

Browse files
authored
Merge pull request #158 from codecrafters-io/andy/upgrade-rust-go
CC-2051: Update Rust to 1.91 and Go to 1.25
2 parents 23e8f72 + d886559 commit 804a5b1

File tree

22 files changed

+57
-27
lines changed

22 files changed

+57
-27
lines changed

compiled_starters/go/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Time to move on to the next stage!
2929

3030
Note: This section is for stages 2 and beyond.
3131

32-
1. Ensure you have `go (1.24)` installed locally
32+
1. Ensure you have `go (1.25)` installed locally
3333
1. Run `./your_program.sh` to run your program, which is implemented in
3434
`app/main.go`.
3535
1. Commit your changes and run `git push origin master` to submit your solution

compiled_starters/go/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Go version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: go-1.24
11-
buildpack: go-1.24
10+
# Available versions: go-1.25
11+
buildpack: go-1.25

compiled_starters/go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/codecrafters-io/sqlite-starter-go
22

3-
go 1.24.0
3+
go 1.25.0
44

55
require github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2

compiled_starters/rust/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
name = "codecrafters-sqlite"
33
version = "0.1.0"
44
authors = ["Codecrafters <[email protected]>"]
5-
edition = "2021"
6-
rust-version = "1.80"
5+
edition = "2024"
6+
rust-version = "1.91"
77

88
[dependencies]
99
anyhow = "1.0.68" # error handling

compiled_starters/rust/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Time to move on to the next stage!
2929

3030
Note: This section is for stages 2 and beyond.
3131

32-
1. Ensure you have `cargo (1.87)` installed locally
32+
1. Ensure you have `cargo (1.91)` installed locally
3333
1. Run `./your_program.sh` to run your program, which is implemented in
3434
`src/main.rs`. This command compiles your Rust project, so it might be slow
3535
the first time you run it. Subsequent runs will be fast.

compiled_starters/rust/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Rust version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: rust-1.88
11-
buildpack: rust-1.88
10+
# Available versions: rust-1.91
11+
buildpack: rust-1.91

compiled_starters/rust/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use anyhow::{bail, Result};
1+
use anyhow::{Result, bail};
22
use std::fs::File;
33
use std::io::prelude::*;
44

dockerfiles/go-1.25.Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# syntax=docker/dockerfile:1.7-labs
2+
FROM golang:1.25-alpine
3+
4+
# Ensures the container is re-built if go.mod or go.sum changes
5+
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum"
6+
7+
WORKDIR /app
8+
9+
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
10+
COPY --exclude=.git --exclude=README.md . /app
11+
12+
# Starting from Go 1.20, the go standard library is no loger compiled.
13+
# Setting GODEBUG to "installgoroot=all" restores the old behavior
14+
# hadolint ignore=DL3062
15+
RUN GODEBUG="installgoroot=all" go install std
16+
17+
RUN go mod download

dockerfiles/rust-1.91.Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# syntax=docker/dockerfile:1.7-labs
2+
FROM rust:1.91-trixie
3+
4+
# Rebuild the container if these files change
5+
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock"
6+
7+
WORKDIR /app
8+
9+
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
10+
COPY --exclude=.git --exclude=README.md . /app
11+
12+
# This runs cargo build
13+
RUN .codecrafters/compile.sh

solutions/go/01-dr6/code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Time to move on to the next stage!
2929

3030
Note: This section is for stages 2 and beyond.
3131

32-
1. Ensure you have `go (1.24)` installed locally
32+
1. Ensure you have `go (1.25)` installed locally
3333
1. Run `./your_program.sh` to run your program, which is implemented in
3434
`app/main.go`.
3535
1. Commit your changes and run `git push origin master` to submit your solution

0 commit comments

Comments
 (0)