Skip to content

Commit 54b1553

Browse files
authored
feat(cubestore): Upgrade rust to nightly-2025-08-01 (#9858)
1 parent 3cc34ff commit 54b1553

File tree

27 files changed

+72
-61
lines changed

27 files changed

+72
-61
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ jobs:
618618
- name: Setup Rust toolchain
619619
uses: actions-rust-lang/setup-rust-toolchain@v1
620620
with:
621-
toolchain: nightly-2024-01-29
621+
toolchain: nightly-2025-08-01
622622
target: ${{ matrix.target }}
623623
# override: true # this is by default on
624624
rustflags: ""
@@ -705,7 +705,7 @@ jobs:
705705
- name: Setup Rust toolchain
706706
uses: actions-rust-lang/setup-rust-toolchain@v1
707707
with:
708-
toolchain: nightly-2024-01-29
708+
toolchain: nightly-2025-08-01
709709
target: ${{ matrix.target }}
710710
# override: true # this is by default on
711711
rustflags: ""

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ jobs:
237237
- name: Install Rust
238238
uses: actions-rust-lang/setup-rust-toolchain@v1
239239
with:
240-
toolchain: nightly-2024-01-29
240+
toolchain: nightly-2025-08-01
241241
# override: true # this is by default on
242242
rustflags: ""
243243
components: rustfmt

.github/workflows/rust-cubestore-master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
rust: [nightly-2024-01-29]
24+
rust: [nightly-2025-08-01]
2525
env:
2626
RUST: ${{ matrix.rust }}
2727
steps:
@@ -290,7 +290,7 @@ jobs:
290290
- name: Setup Rust toolchain
291291
uses: actions-rust-lang/setup-rust-toolchain@v1
292292
with:
293-
toolchain: nightly-2024-01-29
293+
toolchain: nightly-2025-08-01
294294
target: ${{ matrix.target }}
295295
# override: true # this is by default on
296296
rustflags: ""

.github/workflows/rust-cubestore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
rust: [nightly-2024-01-29]
29+
rust: [nightly-2025-08-01]
3030
container:
3131
image: cubejs/rust-builder:bookworm-llvm-18
3232
env:
@@ -229,7 +229,7 @@ jobs:
229229
- name: Setup Rust toolchain
230230
uses: actions-rust-lang/setup-rust-toolchain@v1
231231
with:
232-
toolchain: nightly-2024-01-29
232+
toolchain: nightly-2025-08-01
233233
target: ${{ matrix.target }}
234234
# override: true # this is by default on
235235
rustflags: ""

rust/cubeshared/src/codegen/http_message_generated.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ impl core::fmt::Debug for HttpColumnValue<'_> {
12461246
/// catch every error, or be maximally performant. For the
12471247
/// previous, unchecked, behavior use
12481248
/// `root_as_http_message_unchecked`.
1249-
pub fn root_as_http_message(buf: &[u8]) -> Result<HttpMessage, flatbuffers::InvalidFlatbuffer> {
1249+
pub fn root_as_http_message(buf: &[u8]) -> Result<HttpMessage<'_>, flatbuffers::InvalidFlatbuffer> {
12501250
flatbuffers::root::<HttpMessage>(buf)
12511251
}
12521252
#[inline]
@@ -1258,7 +1258,7 @@ pub fn root_as_http_message(buf: &[u8]) -> Result<HttpMessage, flatbuffers::Inva
12581258
/// `size_prefixed_root_as_http_message_unchecked`.
12591259
pub fn size_prefixed_root_as_http_message(
12601260
buf: &[u8],
1261-
) -> Result<HttpMessage, flatbuffers::InvalidFlatbuffer> {
1261+
) -> Result<HttpMessage<'_>, flatbuffers::InvalidFlatbuffer> {
12621262
flatbuffers::size_prefixed_root::<HttpMessage>(buf)
12631263
}
12641264
#[inline]
@@ -1291,14 +1291,14 @@ pub fn size_prefixed_root_as_http_message_with_opts<'b, 'o>(
12911291
/// Assumes, without verification, that a buffer of bytes contains a HttpMessage and returns it.
12921292
/// # Safety
12931293
/// Callers must trust the given bytes do indeed contain a valid `HttpMessage`.
1294-
pub unsafe fn root_as_http_message_unchecked(buf: &[u8]) -> HttpMessage {
1294+
pub unsafe fn root_as_http_message_unchecked(buf: &[u8]) -> HttpMessage<'_> {
12951295
flatbuffers::root_unchecked::<HttpMessage>(buf)
12961296
}
12971297
#[inline]
12981298
/// Assumes, without verification, that a buffer of bytes contains a size prefixed HttpMessage and returns it.
12991299
/// # Safety
13001300
/// Callers must trust the given bytes do indeed contain a valid size prefixed `HttpMessage`.
1301-
pub unsafe fn size_prefixed_root_as_http_message_unchecked(buf: &[u8]) -> HttpMessage {
1301+
pub unsafe fn size_prefixed_root_as_http_message_unchecked(buf: &[u8]) -> HttpMessage<'_> {
13021302
flatbuffers::size_prefixed_root_unchecked::<HttpMessage>(buf)
13031303
}
13041304
#[inline]

rust/cubestore/CLAUDE.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,27 @@ The codebase uses a custom dependency injection system defined in `config/inject
133133

134134
## Important Notes
135135

136-
- This is a Rust nightly project (see `rust-toolchain.toml`)
136+
- **Rust Nightly**: Uses nightly-2025-08-01 (see `rust-toolchain.toml`)
137137
- Uses custom forks of Arrow/DataFusion and sqlparser-rs for Cube-specific features
138138
- Distributed mode involves router and worker nodes communicating via RPC
139139
- Heavy use of async/await patterns with Tokio runtime
140-
- Parquet files are the primary storage format for data
140+
- Parquet files are the primary storage format for data
141+
142+
## Docker Configuration
143+
144+
The project includes Docker configurations for building and deploying CubeStore:
145+
146+
- **`builder.Dockerfile`**: Defines the base build image with Rust nightly-2025-08-01, LLVM 18, and build dependencies
147+
- **`Dockerfile`**: Production Dockerfile that uses `cubejs/rust-builder:bookworm-llvm-18` base image and copies rust-toolchain.toml
148+
- **GitHub Actions**: Multiple CI/CD workflows use the same Rust version
149+
150+
## Updating Rust Version
151+
152+
When updating the Rust version, ensure ALL these files are kept in sync:
153+
154+
1. **`rust-toolchain.toml`** - Primary source of truth for local development
155+
2. **`builder.Dockerfile`** - Update the rustup default command with the new nightly version
156+
3. **`Dockerfile`** - Copies rust-toolchain.toml (no manual update needed if builder image is updated)
157+
4. **GitHub Workflows** - Update all occurrences of the Rust nightly version in `.github/workflows/` directory
158+
159+
**Note**: The `cubejs/rust-builder:bookworm-llvm-18` Docker image tag may also need updating if the builder.Dockerfile changes significantly.

rust/cubestore/Cargo.lock

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/cubestore/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WORKDIR /build/cubestore
44

55
COPY cubeshared /build/cubeshared
66

7+
COPY cubestore/rust-toolchain.toml .
78
COPY cubestore/Cargo.toml .
89
COPY cubestore/Cargo.lock .
910
COPY cubestore/cuberockstore cuberockstore

rust/cubestore/builder.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ FROM rust:$OS_NAME
55
ARG LLVM_VERSION=18
66

77
RUN rustup update && \
8-
rustup default nightly-2024-01-29 && \
9-
rustup component add --toolchain nightly-2024-01-29 rustfmt clippy;
8+
rustup default nightly-2025-08-01 && \
9+
rustup component add --toolchain nightly-2025-08-01 rustfmt clippy;
1010

1111
RUN apt update \
1212
&& apt upgrade -y \

rust/cubestore/cubehll/src/instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ struct BitCursor<'a> {
12171217
}
12181218

12191219
impl BitCursor<'_> {
1220-
pub fn new(input: &[u8]) -> BitCursor {
1220+
pub fn new(input: &[u8]) -> BitCursor<'_> {
12211221
BitCursor {
12221222
input,
12231223
pos: 0,

0 commit comments

Comments
 (0)