Environment:Lance format Lance Rust Toolchain
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Build_System |
| Last Updated | 2026-02-08 19:00 GMT |
Overview
Rust 1.90.0 toolchain (MSRV 1.88.0) with Edition 2021, requiring rustfmt, clippy, and rust-analyzer components for the Lance columnar data format workspace.
Description
The Lance project is a Rust workspace of 20+ crates that compile together. The toolchain is pinned to Rust 1.90.0 via `rust-toolchain.toml` to keep clippy and rustfmt behaviour consistent between local development and CI. The Minimum Supported Rust Version (MSRV) is 1.88.0, verified in CI. The workspace uses Rust Edition 2021 and resolver version 2.
Usage
This environment is required for all Rust compilation in the Lance project, including the main `lance` crate, all sub-crates (lance-core, lance-encoding, lance-index, lance-io, lance-linalg, lance-table, etc.), and the Python/Java binding crates. Any Implementation that compiles Rust code requires this environment.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux, macOS, or Windows | Full CI coverage on all three |
| Hardware | x86_64 or aarch64 CPU | loongarch64 also partially supported |
| Disk | 10GB+ SSD | For cargo build cache and target directory |
Dependencies
System Packages
- `protobuf-compiler` (protoc) — required unless the `protoc` feature flag is enabled for vendored protobuf
- `libssl-dev` — required on Linux for TLS support
- `pkg-config` — required on ARM64 Linux builds
- `clang` / `clang++` — required as C/C++ compiler for SIMD kernel compilation and general builds
- `mold` (optional) — used in CI as a faster linker via `rui314/setup-mold`
Rust Toolchain
- Rust channel: `1.90.0` (pinned)
- Components: `rustfmt`, `clippy`, `rust-analyzer`
- Edition: `2021`
- MSRV: `1.88.0`
- Resolver: `2`
Key Cargo Dependencies
- `arrow` = 57.0.0 — Apache Arrow integration
- `tokio` >= 1.23 — Async runtime
- `prost` = 0.14.1 — Protocol Buffers
- `datafusion` = 51.0.0 — Query engine
- `object_store` = 0.12.3 — Cloud storage abstraction
- `tantivy` = 0.24.1 — Full-text search engine
- `roaring` = 0.10.1 — Bitmap data structure
- `half` = 2.1 — Float16 support
Credentials
No credentials are required for the Rust toolchain itself. Cloud storage credentials are documented in Environment:Lance_format_Lance_Cloud_Storage_Credentials.
Quick Install
# Install Rust toolchain (pinned version will be read from rust-toolchain.toml)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install system dependencies (Ubuntu/Debian)
sudo apt-get install -y protobuf-compiler libssl-dev pkg-config clang
# Verify toolchain
rustc --version # Should show 1.90.0
cargo check --workspace --tests --benches
Code Evidence
Toolchain pinning from `rust-toolchain.toml:1-5`:
# We keep this pinned to keep clippy and rustfmt in sync between local and CI.
# Feel free to upgrade to bring in new lints.
[toolchain]
channel = "1.90.0"
components = ["rustfmt", "clippy", "rust-analyzer"]
MSRV from `Cargo.toml:50`:
rust-version = "1.88.0"
Workspace edition from `Cargo.toml:31`:
edition = "2021"
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `error: package lance-core v3.0.0-beta.2 cannot be built because it requires rustc 1.88.0` | Rust toolchain too old | Run `rustup update` or let `rust-toolchain.toml` auto-select |
| `error: could not find protoc` | protobuf-compiler not installed | `sudo apt-get install protobuf-compiler` or enable `protoc` feature flag |
| `error: linker cc not found` | Missing C compiler | `sudo apt-get install build-essential clang` |
Compatibility Notes
- Windows: fp16 SIMD kernels are not supported. The build will emit a warning and skip kernel compilation.
- macOS: XCode 15.4 is used in CI. XCode 15.0.1 has known issues with backtraces.
- Linux ARM64: Requires `pkg-config` and `libssl-dev` in addition to standard dependencies.
- Nightly Rust: Used in CI for code coverage (`llvm-cov`). Not required for development.
Related Pages
- Implementation:Lance_format_Lance_Dataset_Write
- Implementation:Lance_format_Lance_InsertBuilder
- Implementation:Lance_format_Lance_Dataset_Scan
- Implementation:Lance_format_Lance_CreateIndexBuilder
- Implementation:Lance_format_Lance_VectorIndexParams
- Implementation:Lance_format_Lance_Plan_Compaction
- Implementation:Lance_format_Lance_CommitHandler
- Implementation:Lance_format_Lance_InvertedIndexParams