This is an automated email from the ASF dual-hosted git repository.
lxy-9602 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 5d467dbd chore(build): use one Rust toolchain for all FFI builds (#439)
5d467dbd is described below
commit 5d467dbd78696235d04638764513de472c96d6b0
Author: zhouyc-ali <[email protected]>
AuthorDate: Mon Oct 19 10:37:41 2026 +0800
chore(build): use one Rust toolchain for all FFI builds (#439)
---
ci/scripts/setup_rust.sh | 9 ++-------
cmake_modules/ThirdpartyToolchain.cmake | 9 +++++++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/ci/scripts/setup_rust.sh b/ci/scripts/setup_rust.sh
index a013e7f8..f3544f8c 100755
--- a/ci/scripts/setup_rust.sh
+++ b/ci/scripts/setup_rust.sh
@@ -26,8 +26,8 @@
set -eux
RUSTUP_VERSION=${RUSTUP_VERSION:-1.29.0}
-# 1.90.0 is the minimum required by paimon-full-text 0.1.0 (rust-version in
its Cargo.toml).
-RUST_VERSION=${RUST_VERSION:-1.90.0}
+# Keep in sync with PAIMON_RUST_TOOLCHAIN in
cmake_modules/ThirdpartyToolchain.cmake.
+RUST_VERSION=${RUST_VERSION:-1.95.0}
CBINDGEN_VERSION=${CBINDGEN_VERSION:-0.29.2}
PROTOC_VERSION=27.4
@@ -76,11 +76,6 @@ if ! command -v protoc >/dev/null 2>&1 || \
echo "${protoc_home}/bin" >> "${GITHUB_PATH:-/dev/null}" || true
fi
-# Vortex's FFI build pins rust-version >= 1.95 and is invoked with
RUSTUP_TOOLCHAIN=stable (see
-# cmake_modules/ThirdpartyToolchain.cmake). Install the stable channel
alongside the pinned default
-# so Vortex builds with it while Lance, Mosaic and tantivy-fts keep using the
default toolchain.
-rustup toolchain install stable --profile minimal
-
# cbindgen is used by the crate's build.rs to emit the C header that the
# C++ side includes. Corrosion will also run cbindgen at CMake configure
# time; both paths need it available.
diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
index ac94fc2b..4910d1c2 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -1499,6 +1499,11 @@ macro(build_vortex)
# neither of which can go through paimon's filesystem. `callback_io.rs`
adds an entry point
# backed by host callbacks; it is maintained in this repository and
injected into the Vortex
# source tree, and the patch only declares the module.
+ # Keep in sync with RUST_VERSION in ci/scripts/setup_rust.sh; it overrides
the
+ # rust-toolchain.toml shipped inside the Vortex archive.
+ set(PAIMON_RUST_TOOLCHAIN
+ "1.95.0"
+ CACHE STRING "Rust toolchain used by the Vortex FFI build.")
set(VORTEX_PATCH_FILE "${CMAKE_CURRENT_LIST_DIR}/vortex.diff")
set(VORTEX_CALLBACK_IO_SRC
"${CMAKE_SOURCE_DIR}/crates/vortex_callback_io/callback_io.rs")
@@ -1533,8 +1538,8 @@ macro(build_vortex)
"${VORTEX_CALLBACK_IO_SRC}"
"<SOURCE_DIR>/vortex-ffi/src/callback_io.rs"
COMMAND ${CMAKE_COMMAND} -E env "FLATC=${VORTEX_FLATC}"
- "RUSTUP_TOOLCHAIN=stable"
"CC=${CMAKE_C_COMPILER}"
- "CXX=${CMAKE_CXX_COMPILER}"
+ "RUSTUP_TOOLCHAIN=${PAIMON_RUST_TOOLCHAIN}"
+ "CC=${CMAKE_C_COMPILER}"
"CXX=${CMAKE_CXX_COMPILER}"
"CARGO_TARGET_DIR=${VORTEX_CARGO_TARGET_DIR}"
"RUSTFLAGS=-Crelocation-model=pic"
${PAIMON_CARGO_EXECUTABLE} rustc --locked
--package