Skip to content

chore: raise MSRV to Rust 1.100 and use newly stabilized APIs - #149

Open
KonradHoeffner wants to merge 1 commit into
mainfrom
checkup/rust-1.100
Open

KonradHoeffner wants to merge 1 commit into
mainfrom
checkup/rust-1.100

Conversation

@KonradHoeffner

@KonradHoeffner KonradHoeffner commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Created by OpenCode

Summary

Rust 1.100.0 was released today (2026-11-12), so this is the scheduled post-release checkup that raises the declared MSRV from 1.89 to the current stable and applies what became possible:

  • rust-version 1.89 → 1.100 in Cargo.toml.
  • src/containers/sequence.rs: use the stable bit_width() instead of the BITS - leading_zeros() emulation (one spot carried a // nightly only comment, the other was unannotated; identical semantics, including 0).
  • src/hdt_graph.rs: fix the stale type Error = Infallible; // infallible for now, figure out what to put here later comment — Infallible is now a type alias to ! since the never type was stabilized in 1.100. No code change needed: sophia's Graph::Error bound (Error + Send + Sync + 'static) is still satisfied, and Infallible and ! are now the same type anyway.
  • CI: add an msrv job to lint_and_test.yml that builds and tests with exactly Rust 1.100.0 (via dtolnay/rust-toolchain@1.100.0), so the declared minimum is actually verified instead of just being documentation.

Not done in this PR (follow-up candidates)

  • String::from_utf8_lossy_owned (1.99) in control_info.rs: would avoid a double copy, but needs restructuring because the lossy string is used twice — skipped as not worth the churn.
  • std::alloc::Allocator was stabilized in 1.100, which unblocks Rust 1.100.0 custom allocator optimizations? #139 (custom allocators for huge transient arrays) — that needs benchmarking first and deserves its own PR.
  • Cargo 1.100's new cargo::unused_dependencies lint: can be wired into [lints.cargo] in a later PR once the 1.100 toolchain is widely available.

Verification

  • cargo fmt --check, cargo clippy --no-deps --all-features --all-targets (only the pre-existing pedantic warnings: sparql.rs:132 w3c_tests too_many_lines, hdt.rs:409 items_after_statements, benches/criterion.rs:105 redundant_closure)
  • full cargo test --all-features: 27 unit + 19 doc tests pass
  • feature-combination checks: --no-default-features, --no-default-features --features sophia, --no-default-features --features cache, --all-targets --features cache

Note: the rustup dist server had not propagated the 1.100.0 artifacts yet when this was verified locally (releases.rs already lists 1.100.0 as released today), so local verification ran on nightly 1.102 (which satisfies the declared 1.100). The msrv CI job will confirm the exact toolchain once the CDN has caught up.

@github-actions

Copy link
Copy Markdown

📊 Code Metrics (Rust)

State Files Blank Comment Code
Before 29 544 1014 4311
After 29 544 1013 4311
Diff 0 0 -1 0
% Diff 0.0% 0.0% -0.1% 0.0%

- rust-version 1.89 -> 1.100 (Rust 1.100.0, released 2026-11-12)
- use the newly stable integer bit_width() instead of the
  BITS - leading_zeros() emulation in sequence.rs
- fix stale Infallible comment in hdt_graph.rs: Infallible is now
  a type alias to the stabilized never type
- add an MSRV job to the test workflow so the declared minimum
  is actually verified
@KonradHoeffner

Copy link
Copy Markdown
Owner Author

Not worth it yet, no performance increase and risk of breakage for library users.
We can think about keeping the MSRV check though and investigate later if anything worthwhile arrives in later versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant