Skip to content

Commit 428b61f

Browse files
committed
chore(build): use one Rust toolchain for all FFI builds
Bump the pinned Rust toolchain to 1.95.0 and drop the separate stable channel that only the Vortex FFI build used. The Vortex cargo invocation now selects the pinned toolchain explicitly, which overrides the rust-toolchain.toml shipped inside the Vortex archive, so Lance, Mosaic, Vortex and the full-text index all build with a single toolchain.
1 parent 242decf commit 428b61f

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎ci/scripts/setup_rust.sh‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
set -eux
2727

2828
RUSTUP_VERSION=${RUSTUP_VERSION:-1.29.0}
29-
# 1.90.0 is the minimum required by paimon-full-text 0.1.0 (rust-version in its Cargo.toml).
30-
RUST_VERSION=${RUST_VERSION:-1.90.0}
29+
# Keep in sync with PAIMON_RUST_TOOLCHAIN in cmake_modules/ThirdpartyToolchain.cmake.
30+
RUST_VERSION=${RUST_VERSION:-1.95.0}
3131
CBINDGEN_VERSION=${CBINDGEN_VERSION:-0.29.2}
3232
PROTOC_VERSION=27.4
3333

@@ -76,11 +76,6 @@ if ! command -v protoc >/dev/null 2>&1 || \
7676
echo "${protoc_home}/bin" >> "${GITHUB_PATH:-/dev/null}" || true
7777
fi
7878

79-
# Vortex's FFI build pins rust-version >= 1.95 and is invoked with RUSTUP_TOOLCHAIN=stable (see
80-
# cmake_modules/ThirdpartyToolchain.cmake). Install the stable channel alongside the pinned default
81-
# so Vortex builds with it while Lance, Mosaic and tantivy-fts keep using the default toolchain.
82-
rustup toolchain install stable --profile minimal
83-
8479
# cbindgen is used by the crate's build.rs to emit the C header that the
8580
# C++ side includes. Corrosion will also run cbindgen at CMake configure
8681
# time; both paths need it available.

‎cmake_modules/ThirdpartyToolchain.cmake‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,11 @@ macro(build_vortex)
14991499
# neither of which can go through paimon's filesystem. `callback_io.rs` adds an entry point
15001500
# backed by host callbacks; it is maintained in this repository and injected into the Vortex
15011501
# source tree, and the patch only declares the module.
1502+
# Keep in sync with RUST_VERSION in ci/scripts/setup_rust.sh; it overrides the
1503+
# rust-toolchain.toml shipped inside the Vortex archive.
1504+
set(PAIMON_RUST_TOOLCHAIN
1505+
"1.95.0"
1506+
CACHE STRING "Rust toolchain used by the Vortex FFI build.")
15021507
set(VORTEX_PATCH_FILE "${CMAKE_CURRENT_LIST_DIR}/vortex.diff")
15031508
set(VORTEX_CALLBACK_IO_SRC
15041509
"${CMAKE_SOURCE_DIR}/crates/vortex_callback_io/callback_io.rs")
@@ -1533,8 +1538,8 @@ macro(build_vortex)
15331538
"${VORTEX_CALLBACK_IO_SRC}"
15341539
"<SOURCE_DIR>/vortex-ffi/src/callback_io.rs"
15351540
COMMAND ${CMAKE_COMMAND} -E env "FLATC=${VORTEX_FLATC}"
1536-
"RUSTUP_TOOLCHAIN=stable" "CC=${CMAKE_C_COMPILER}"
1537-
"CXX=${CMAKE_CXX_COMPILER}"
1541+
"RUSTUP_TOOLCHAIN=${PAIMON_RUST_TOOLCHAIN}"
1542+
"CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}"
15381543
"CARGO_TARGET_DIR=${VORTEX_CARGO_TARGET_DIR}"
15391544
"RUSTFLAGS=-Crelocation-model=pic"
15401545
${PAIMON_CARGO_EXECUTABLE} rustc --locked --package

0 commit comments

Comments
 (0)