Skip to content

Commit 27ef0bb

Browse files
authored
ci(rust): check MSRV and upgrade toolchain (lancedb#1960)
* Upgrades our toolchain file to v1.83.0, since many dependencies now have MSRV of 1.81.0 * Reverts Rust changes from lancedb#1946 that were working around this in a dumb way * Adding an MSRV check * Reduce MSRV back to 1.78.0
1 parent 25402ba commit 27ef0bb

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

.github/workflows/rust.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ jobs:
185185
Add-Content $env:GITHUB_PATH "C:\BuildTools\VC\Tools\Llvm\x64\bin"
186186
187187
# Add MSVC runtime libraries to LIB
188-
$env:LIB = "C:\BuildTools\VC\Tools\MSVC\$latestVersion\lib\arm64;" +
188+
$env:LIB = "C:\BuildTools\VC\Tools\MSVC\$latestVersion\lib\arm64;" +
189189
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\arm64;" +
190190
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\arm64"
191191
Add-Content $env:GITHUB_ENV "LIB=$env:LIB"
@@ -238,3 +238,41 @@ jobs:
238238
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
239239
cargo build --target aarch64-pc-windows-msvc
240240
cargo test --target aarch64-pc-windows-msvc
241+
242+
msrv:
243+
# Check the minimum supported Rust version
244+
name: MSRV Check - Rust v${{ matrix.msrv }}
245+
runs-on: ubuntu-24.04
246+
strategy:
247+
matrix:
248+
msrv: ["1.78.0"] # This should match up with rust-version in Cargo.toml
249+
env:
250+
# Need up-to-date compilers for kernels
251+
CC: clang-18
252+
CXX: clang++-18
253+
steps:
254+
- uses: actions/checkout@v4
255+
with:
256+
submodules: true
257+
- name: Install dependencies
258+
run: |
259+
sudo apt update
260+
sudo apt install -y protobuf-compiler libssl-dev
261+
- name: Install ${{ matrix.msrv }}
262+
uses: dtolnay/rust-toolchain@master
263+
with:
264+
toolchain: ${{ matrix.msrv }}
265+
- name: Downgrade dependencies
266+
# These packages have newer requirements for MSRV
267+
run: |
268+
cargo update -p aws-sdk-bedrockruntime --precise 1.64.0
269+
cargo update -p aws-sdk-dynamodb --precise 1.55.0
270+
cargo update -p aws-config --precise 1.5.10
271+
cargo update -p aws-sdk-kms --precise 1.51.0
272+
cargo update -p aws-sdk-s3 --precise 1.65.0
273+
cargo update -p aws-sdk-sso --precise 1.50.0
274+
cargo update -p aws-sdk-ssooidc --precise 1.51.0
275+
cargo update -p aws-sdk-sts --precise 1.51.0
276+
cargo update -p home --precise 0.5.9
277+
- name: cargo +${{ matrix.msrv }} check
278+
run: cargo check --workspace --tests --benches --all-features

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repository = "https://github.com/lancedb/lancedb"
1818
description = "Serverless, low-latency vector database for AI applications"
1919
keywords = ["lancedb", "lance", "database", "vector", "search"]
2020
categories = ["database-implementations"]
21-
rust-version = "1.80.0" # TODO: lower this once we upgrade Lance again.
21+
rust-version = "1.78.0"
2222

2323
[workspace.dependencies]
2424
lance = { "version" = "=0.21.0", "features" = [

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.80.0"
2+
channel = "1.83.0"

rust/lancedb/Cargo.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license.workspace = true
77
repository.workspace = true
88
keywords.workspace = true
99
categories.workspace = true
10-
rust-version = "1.75"
10+
rust-version.workspace = true
1111

1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1313
[dependencies]
@@ -62,8 +62,6 @@ http = { version = "1", optional = true } # Matching what is in reqwest
6262
uuid = { version = "1.7.0", features = ["v4"], optional = true }
6363
polars-arrow = { version = ">=0.37,<0.40.0", optional = true }
6464
polars = { version = ">=0.37,<0.40.0", optional = true }
65-
# There was a big jump in MSRV for this package, and it's used by Polars.
66-
home = { version = "=0.5.9", optional = true }
6765
hf-hub = { version = "0.3.2", optional = true }
6866
candle-core = { version = "0.6.0", optional = true }
6967
candle-transformers = { version = "0.6.0", optional = true }
@@ -91,7 +89,7 @@ fp16kernels = ["lance-linalg/fp16kernels"]
9189
s3-test = []
9290
bedrock = ["dep:aws-sdk-bedrockruntime"]
9391
openai = ["dep:async-openai", "dep:reqwest"]
94-
polars = ["dep:polars-arrow", "dep:polars", "dep:home"]
92+
polars = ["dep:polars-arrow", "dep:polars"]
9593
sentence-transformers = [
9694
"dep:hf-hub",
9795
"dep:candle-core",

rust/lancedb/src/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ pub trait QueryBase {
339339
fn limit(self, limit: usize) -> Self;
340340

341341
/// Set the offset of the query.
342-
342+
///
343343
/// By default, it fetches starting with the first row.
344344
/// This method can be used to skip the first `offset` rows.
345345
fn offset(self, offset: usize) -> Self;

0 commit comments

Comments
 (0)