Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

fix(docker): raise Rust MSRV for ragfs builds (#1448)

Qin Haojie62c023307de0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8801d0aa4..770ed2ae7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -15,7 +15,7 @@ Thank you for your interest in OpenViking! We welcome contributions of all kinds
- **Python**: 3.10+
- **Go**: 1.22+ (Required for building AGFS components from source)
-- **Rust**: 1.88+ (Required for source builds because the bundled `ov` CLI is built during packaging)
+- **Rust**: 1.91.1+ (Required for source builds because the bundled `ov` CLI is built during packaging)
- **C++ Compiler**: GCC 9+ or Clang 11+ (Required for building core extensions, must support C++17)
- **CMake**: 3.12+
diff --git a/CONTRIBUTING_CN.md b/CONTRIBUTING_CN.md
index 649c82c8d..2cb777f76 100644
--- a/CONTRIBUTING_CN.md
+++ b/CONTRIBUTING_CN.md
@@ -15,7 +15,7 @@
- **Python**: 3.10+
- **Go**: 1.22+ (从源码构建 AGFS 组件需要)
-- **Rust**: 1.88+(从源码构建需要;打包流程会同时构建内置 `ov` CLI)
+- **Rust**: 1.91.1+(从源码构建需要;打包流程会同时构建内置 `ov` CLI)
- **C++ 编译器**: GCC 9+ 或 Clang 11+ (构建核心扩展需要,必须支持 C++17)
- **CMake**: 3.12+
diff --git a/CONTRIBUTING_JA.md b/CONTRIBUTING_JA.md
index 7f27be750..17f9d9587 100644
--- a/CONTRIBUTING_JA.md
+++ b/CONTRIBUTING_JA.md
@@ -15,7 +15,7 @@ OpenVikingに興味をお持ちいただきありがとうございます!あ
- **Python**: 3.10以上
- **Go**: 1.22以上(AGFSコンポーネントのソースビルドに必要)
-- **Rust**: 1.88以上(ソースビルド時に同梱の `ov` CLI もビルドされるため必須)
+- **Rust**: 1.91.1以上(ソースビルド時に同梱の `ov` CLI もビルドされるため必須)
- **C++コンパイラ**: GCC 9以上 または Clang 11以上(コア拡張のビルドに必要、C++17サポートが必須)
- **CMake**: 3.12以上
@@ -117,7 +117,7 @@ Rust CLI(`ov`)は、OpenViking Serverとやり取りするための高性能
`ov` を直接使わない場合でも、OpenViking をソースからビルドするなら Rust ツールチェーンは必要です。パッケージング時に同梱 CLI バイナリも一緒にビルドされるためです。
-**前提条件**: Rust >= 1.88
+**前提条件**: Rust >= 1.91.1
```bash
# ソースからビルドしてインストール
diff --git a/Dockerfile b/Dockerfile
index 7518ac683..be72c1711 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,8 @@
# syntax=docker/dockerfile:1.9
# Stage 1: provide Rust toolchain (required by setup.py -> build_ov_cli_artifact -> cargo build)
-FROM rust:1.88-trixie AS rust-toolchain
+# ragfs-python's default S3-enabled dependency set currently requires rustc >= 1.91.1.
+FROM rust:1.91.1-trixie AS rust-toolchain
# Stage 2: build Python environment with uv (builds Rust CLI + C++ extension from source)
FROM ghcr.io/astral-sh/uv:python3.13-trixie-slim AS py-builder
diff --git a/Makefile b/Makefile
index a8cc3a782..881b22e16 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ OV_CLI_DIR := crates/ov_cli
# Dependency Versions
MIN_PYTHON_VERSION := 3.10
MIN_CMAKE_VERSION := 3.12
-MIN_RUST_VERSION := 1.88
+MIN_RUST_VERSION := 1.91.1
MIN_GCC_VERSION := 9
MIN_CLANG_VERSION := 11
@@ -64,7 +64,7 @@ check-deps:
@# Rust check
@command -v rustc > /dev/null 2>&1 || (echo "Error: Rust is not installed."; exit 1)
@RUST_VER=$$(rustc --version | awk '{print $$2}'); \
- $(PYTHON) -c "v='$$RUST_VER'.split('.'); exit(0 if int(v[0]) > 1 or (int(v[0]) == 1 and int(v[1]) >= 88) else 1)" || (echo "Error: Rust >= $(MIN_RUST_VERSION) is required. Found $$RUST_VER"; exit 1); \
+ $(PYTHON) -c "import sys; parse=lambda v: tuple(int(x) for x in v.split('.')); raise SystemExit(0 if parse(sys.argv[1]) >= parse(sys.argv[2]) else 1)" "$$RUST_VER" "$(MIN_RUST_VERSION)" || (echo "Error: Rust >= $(MIN_RUST_VERSION) is required. Found $$RUST_VER"; exit 1); \
echo " [OK] Rust $$RUST_VER"
@# C++ Compiler check
@if command -v clang++ > /dev/null 2>&1; then \
diff --git a/crates/ov_cli/Cargo.toml b/crates/ov_cli/Cargo.toml
index c34ebdae7..8a436ec43 100644
--- a/crates/ov_cli/Cargo.toml
+++ b/crates/ov_cli/Cargo.toml
@@ -2,6 +2,7 @@
name = "ov_cli"
version = "0.2.6"
edition = "2024"
+rust-version = "1.91.1"
authors = ["OpenViking Contributors"]
description = "Rust CLI client for OpenViking"
license = "MIT"
diff --git a/crates/ov_cli/README.md b/crates/ov_cli/README.md
index a8382b55b..65030066e 100644
--- a/crates/ov_cli/README.md
+++ b/crates/ov_cli/README.md
@@ -13,7 +13,7 @@ curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/o
### From Source
```bash
-# openviking need rust >= 1.88, please upgrade it if necessary
+# openviking need rust >= 1.91.1, please upgrade it if necessary
# brew upgrade rust
cargo install --path crates/ov_cli
```
diff --git a/crates/ragfs-python/Cargo.toml b/crates/ragfs-python/Cargo.toml
index 3f02b271f..15d528598 100644
--- a/crates/ragfs-python/Cargo.toml
+++ b/crates/ragfs-python/Cargo.toml
@@ -2,6 +2,7 @@
name = "ragfs-python"
version = "0.1.0"
edition = "2021"
+rust-version = "1.91.1"
description = "Python bindings for RAGFS - Rust AGFS filesystem"
publish = false
diff --git a/crates/ragfs/Cargo.toml b/crates/ragfs/Cargo.toml
index 4e2569c12..aecc70454 100644
--- a/crates/ragfs/Cargo.toml
+++ b/crates/ragfs/Cargo.toml
@@ -2,6 +2,7 @@
name = "ragfs"
version = "0.1.0"
edition = "2021"
+rust-version = "1.91.1"
authors = ["OpenViking Contributors"]
description = "Rust implementation of AGFS - Aggregated File System for AI Agents"
license = "Apache-2.0"
diff --git a/tests/misc/test_root_docker_image_packaging.py b/tests/misc/test_root_docker_image_packaging.py
index 312ce4d19..75c34d2a7 100644
--- a/tests/misc/test_root_docker_image_packaging.py
+++ b/tests/misc/test_root_docker_image_packaging.py
@@ -1,3 +1,4 @@
+import re
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[2]
@@ -7,12 +8,34 @@ def _read_text(relative_path: str) -> str:
return (REPO_ROOT / relative_path).read_text(encoding="utf-8")
+def _extract_rust_version(pattern: str, text: str) -> str:
+ match = re.search(pattern, text, re.MULTILINE)
+ assert match, f"Pattern not found: {pattern}"
+ return match.group("version")
+
+
def test_root_dockerfile_copies_bot_sources_into_build_context():
dockerfile = _read_text("Dockerfile")
assert "COPY bot/ bot/" in dockerfile
+def test_dockerfile_and_makefile_share_the_same_minimum_rust_version():
+ dockerfile = _read_text("Dockerfile")
+ makefile = _read_text("Makefile")
+
+ docker_rust_version = _extract_rust_version(
+ r"^FROM rust:(?P<version>[0-9.]+)-trixie AS rust-toolchain$",
+ dockerfile,
+ )
+ make_rust_version = _extract_rust_version(
+ r"^MIN_RUST_VERSION := (?P<version>[0-9.]+)$",
+ makefile,
+ )
+
+ assert docker_rust_version == make_rust_version
+
+
def test_openviking_package_includes_console_static_assets():
pyproject = _read_text("pyproject.toml")
setup_py = _read_text("setup.py")
@@ -41,5 +64,28 @@ def test_root_build_system_includes_maturin_for_isolated_builds():
setup_py = _read_text("setup.py")
assert '"maturin>=1.0,<2.0",' in pyproject
- assert '[sys.executable, "-m", "maturin", "build", "--release", "--out", tmpdir]' in setup_py
+ assert "sys.executable," in setup_py
+ assert '"maturin",' in setup_py
+ assert '"build",' in setup_py
+ assert '"--release",' in setup_py
+ assert '"--features",' in setup_py
+ assert '"s3",' in setup_py
+ assert '"--out",' in setup_py
+ assert "tmpdir," in setup_py
assert 'shutil.which("maturin")' not in setup_py
+
+
+def test_rust_crates_declare_the_repo_minimum_rust_version():
+ makefile = _read_text("Makefile")
+ min_rust_version = _extract_rust_version(
+ r"^MIN_RUST_VERSION := (?P<version>[0-9.]+)$",
+ makefile,
+ )
+
+ for relative_path in (
+ "crates/ov_cli/Cargo.toml",
+ "crates/ragfs/Cargo.toml",
+ "crates/ragfs-python/Cargo.toml",
+ ):
+ cargo_toml = _read_text(relative_path)
+ assert f'rust-version = "{min_rust_version}"' in cargo_toml