google / google/flatbuffers

[Rust] Clarify MSRV and Clippy policy

Open
#9,238 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
26.5k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

While looking at the Rust crates, I noticed that their Rust-version declarations and Clippy coverage differ.

flatbuffers: `rust-version = "1.51"`
flexbuffers: no rust-version
flatbuffers-reflection: no rust-version, `edition = "2021"`

I also found the earlier MSRV discussion in #5812 and the Rust change-policy discussion in #6718, which appear to describe a policy of supporting roughly the two most recent stable Rust releases. I'm not sure how that policy relates to the current `rust-version = "1.51"` or other crates.

With Rust `1.98.1` and Clippy `0.1.98` I currently see:

flatbuffers: 14 Clippy warnings
flexbuffers: 55 Clippy warnings
reflection: 59 Clippy warnings
rust-analyzer also reports 21 warnings in reflection

I also noticed that `tests/RustTest.sh` runs cargo clippy from `tests/rust_usage_test`. That crate has path dependencies on `flatbuffers` and `flexbuffers`, so this appears to provide Clippy coverage for those crates. However, the command does not use `-D warnings`, so the "No Cargo clippy lints test" step succeeds even when Clippy emits warnings.

`reflection` is not a dependency of `rust_usage_test`, so it does not appear to be covered by that Clippy run.

Could maintainers clarify the intended policy here?

1. What is the current MSRV for the Rust crates, and should all three crates declare rust-version?
2. Is handwritten Rust code expected to be warning/Clippy-clean?
3. Is the existing "No Cargo clippy lints test" intended to enforce zero Clippy warnings?

I'd like to confirm the intended policy before making cleanup or CI changes.

Contributor guide

Open the contributing guide

Research direction

Start with the Rust crate manifests, tests/RustTest.sh, and tests/rust_usage_test, then review discussions #5812 and #6718. Confirm the intended MSRV, warning and Clippy expectations, and whether reflection needs coverage; the issue is done when maintainers agree on a documented policy and its enforcement scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, ci-cd
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.