Skip to content

Commit c11b780

Browse files
tanriolemilio
authored andcommitted
Readme/CI: mention and test the MSRV
Write down the minimal supported Rust version in the README.md and add a CI test that ensures MSRV bumps cannot happen accidentally.
1 parent 2793fd4 commit c11b780

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ env:
6565
# Miscellaneous tests.
6666
- LLVM_VERSION="9.0" BINDGEN_JOB="misc"
6767
- LLVM_VERSION="9.0" BINDGEN_JOB="quickchecking"
68+
- LLVM_VERSION="9.0" BINDGEN_JOB="msrv"
6869

6970
matrix:
7071
fast_finish: true

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ extern "C" {
3737

3838
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang.github.io/rust-bindgen)
3939

40+
## MSRV
41+
42+
The minimum supported Rust version is **1.34**.
43+
44+
No MSRV bump policy has been established yet, so MSRV may increase in any release.
45+
4046
## API Reference
4147

4248
[API reference documentation is on docs.rs](https://docs.rs/bindgen)

ci/script.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ case "$BINDGEN_JOB" in
2626
./ci/assert-no-diff.sh
2727
;;
2828

29+
"msrv")
30+
# Test that the bindgen library can be built with the minimum supported Rust version
31+
# This test should not use Cargo.lock as it's ignored for library builds
32+
rm Cargo.lock
33+
# The MSRV below is also documented in README.md, please keep in sync
34+
rustup install 1.34.0
35+
cargo +1.34.0 build --lib $NO_DEFAULT_FEATURES --features "$BINDGEN_FEATURES"
36+
;;
37+
2938
"integration")
3039
cd ./bindgen-integration
3140
cargo test "$BINDGEN_PROFILE" $NO_DEFAULT_FEATURES --features "$BINDGEN_FEATURES"

0 commit comments

Comments
 (0)