diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f156ee3..bdce071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt + run: rustup show - name: Install protoc # Issue #28: prost-build needs protoc to compile our internal @@ -60,7 +58,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + run: rustup show - name: Install protoc # Issue #28: prost-build needs protoc; ubuntu-latest does not diff --git a/Cargo.toml b/Cargo.toml index a48787f..58723dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,9 @@ default-members = [ "crates/merutable", ] +[workspace.package] +rust-version = "1.88.0" + [workspace.dependencies] # Parquet / Arrow (arrow-rs monorepo) parquet = { version = "53", features = ["async"] } diff --git a/DEVELOPER.md b/DEVELOPER.md index 29b2322..c30f844 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -2,10 +2,12 @@ ## Prerequisites -- **Rust stable** (1.80+): install via [rustup](https://rustup.rs/) +- **Rust**: install via [rustup](https://rustup.rs/) ``` curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` + The exact toolchain version is pinned in `rust-toolchain.toml` at the workspace root. + `rustup` reads this file automatically — no manual version selection needed. - **Git** ## Python bindings (`merutable-python`) @@ -131,3 +133,31 @@ modules with `pub` visibility (a follow-up sweep tightens to ## Adding a dependency All dependency versions are pinned in the workspace root `Cargo.toml` under `[workspace.dependencies]`. Individual crates reference them with `{ workspace = true }`. Never add version specs in crate-level `Cargo.toml` files. + +## MSRV (Minimum Supported Rust Version) + +The MSRV is set via `rust-version` in `[workspace.package]` in the root `Cargo.toml`. + +### Finding the MSRV + +```bash +cargo install cargo-msrv +cargo msrv find --min +``` + +### Verifying after a dependency upgrade + +After bumping a dependency version, check that it still builds with the +MSRV. The `+` syntax tells cargo to use a specific toolchain +instead of the default: + +```bash +# Install the MSRV toolchain (one-time) +rustup install + +# Build against it +cargo + check +``` + +If the build fails, either pin the dependency to its last MSRV-compatible +version or bump `rust-version` in the workspace root. diff --git a/crates/merutable-python/Cargo.toml b/crates/merutable-python/Cargo.toml index 087c442..25f5f77 100644 --- a/crates/merutable-python/Cargo.toml +++ b/crates/merutable-python/Cargo.toml @@ -2,6 +2,7 @@ name = "merutable-python" version = "0.1.0" edition = "2021" +rust-version = { workspace = true } description = "Python bindings for merutable via PyO3" license = "Apache-2.0" publish = false diff --git a/crates/merutable/Cargo.toml b/crates/merutable/Cargo.toml index a9632ea..496a0e3 100644 --- a/crates/merutable/Cargo.toml +++ b/crates/merutable/Cargo.toml @@ -2,6 +2,7 @@ name = "merutable" version = "0.0.1" edition = "2021" +rust-version = { workspace = true } description = "Embeddable single-table engine: row + columnar Parquet with Iceberg-compatible metadata" keywords = ["embedded", "lsm", "iceberg", "parquet", "table"] license = "Apache-2.0" diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..d0ead5e --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "stable" +components = ["clippy", "rustfmt"]