Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project proposal for documenting and testing MSRV in all WG crates #443

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions projects/in-progress/0443-test-msrv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Metadata

* Task Shepherd: @adamgreig
* Contributors: Newcomers welcome!
* Relevant repository: All WG repositories

# Background

All of the Embedded WG's projects should have a defined "Minimum Support Rust
Version" (MSRV). This is the oldest version of the Rust compiler we guarantee
will work with the project. Our MSRV policy is defined
[in ops/msrv.md](https://github.com/rust-embedded/wg/blob/master/ops/msrv.md),
along with how we should document and test it.

However, many of our projects do not document or test an MSRV, which means we
effectively do not know what the MSRV is and might accidentally raise it at
any time. This has been flagged recently in a few projects where the MSRV was
surprisingly high and untested.

# Suggested Task

This project would ensure all WG repositories which:

* Contain a Rust project
* Test that Rust project using a CI system

define a specific MSRV, test it automatically, and document it. The MSRV should
be defined in line with the WG policy of being at least one less than the
current stable Rust version.

# Detailed Work

Our specific goal is to ensure that each project:

* Documents the MSRV in the crate-level documentation, for example in `lib.rs`:

```markdown
# Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.31 and up. It *might*
compile with older versions but that may change in any new patch release.
```

* Tests the MSRV in CI, for example:

```yaml
matrix:
include:
# MSRV
- env: TARGET=thumbv7-none-eabi
rust: 1.31.0
# ...
```

These repositories have been identified as meeting the project criteria:

* [ ] [alloc-cortex-m](https://github.com/rust-embedded/alloc-cortex-m)
* [ ] [arm-dcc](https://github.com/rust-embedded/arm-dcc)
* [ ] [bare-metal](https://github.com/rust-embedded/bare-metal)
* [ ] [cargo-binutils](https://github.com/rust-embedded/cargo-binutils)
* [ ] [cortex-a](https://github.com/rust-embedded/cortex-a)
* [ ] [cortex-m-rt](https://github.com/rust-embedded/cortex-m-rt)
* [ ] [cortex-m-semihosting](https://github.com/rust-embedded/cortex-m-semihosting)
* [ ] [cortex-m](https://github.com/rust-embedded/cortex-m)
* [ ] [cortex-r](https://github.com/rust-embedded/patterns)
* [ ] [cross](https://github.com/rust-embedded/cross)
* [ ] [embedded-hal](https://github.com/rust-embedded/embedded-hal)
* [ ] [fixedvec-rs](https://github.com/rust-embedded/fixedvec-rs)
* [ ] [gpio-cdev](https://github.com/rust-embedded/gpio-cdev)
* [ ] [gpio-utils](https://github.com/rust-embedded/gpio-utils)
* [ ] [itm](https://github.com/rust-embedded/itm)
* [ ] [linux-embedded-hal](https://github.com/rust-embedded/linux-embedded-hal)
* [ ] [msp430-rt](https://github.com/rust-embedded/msp430-rt)
* [ ] [msp430](https://github.com/rust-embedded/msp430)
* [ ] [mutex-trait](https://github.com/rust-embedded/mutex-trait)
* [ ] [panic-itm](https://github.com/rust-embedded/panic-itm)
* [ ] [panic-semihosting](https://github.com/rust-embedded/panic-semihosting)
* [ ] [r0](https://github.com/rust-embedded/r0)
* [ ] [register-rs](https://github.com/rust-embedded/register-rs)
* [ ] [riscv-rt](https://github.com/rust-embedded/riscv-rt)
* [ ] [riscv](https://github.com/rust-embedded/riscv)
* [ ] [rust-i2cdev](https://github.com/rust-embedded/rust-i2cdev)
* [ ] [rust-spidev](https://github.com/rust-embedded/rust-spidev)
* [ ] [rust-sysfs-gpio](https://github.com/rust-embedded/rust-sysfs-gpio)
* [ ] [rust-sysfs-pwm](https://github.com/rust-embedded/rust-sysfs-pwm)
* [ ] [svd2rust](https://github.com/rust-embedded/svd2rust)
* [ ] [svd](https://github.com/rust-embedded/svd)

# Discussion / Unresolved Questions

* Do we want to also include a MSRV badge in repository READMEs? See
[rand](https://github.com/rust-random/rand) for an example.
* Do we want to update the WG policy to stable-2, i.e.
[#427](https://github.com/rust-embedded/wg/issues/427)?

# References

* WG MSRV policy: [msrv.md](https://github.com/rust-embedded/wg/blob/master/ops/msrv.md)
* Original discussion about MSRV policy: [#285](https://github.com/rust-embedded/wg/issues/285)
* PR adding WG MSRV policy: [#304](https://github.com/rust-embedded/wg/pull/304)
* Issue around guidance for MSRV: [#382](https://github.com/rust-embedded/wg/issues/382)
* Recent issue around rethinking the WG MSRV: [#427](https://github.com/rust-embedded/wg/issues/427)
* PR adding MSRV to cortex-m-rt: [#262](https://github.com/rust-embedded/cortex-m-rt/pull/262)
* PR adding MSRV to cortex-m: [#159](https://github.com/rust-embedded/cortex-m/pull/159)