Skip to content

Commit

Permalink
Target MSRV when generating code via bindgen (#37)
Browse files Browse the repository at this point in the history
- roll MSRV back to 1.78
  • Loading branch information
tyranron authored Dec 13, 2024
1 parent 9011cf2 commit e175957
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
msrv: ["1.82.0"]
msrv: ["1.78.0"]
os: ["ubuntu", "macOS", "windows"]
runs-on: ${{ matrix.os }}-latest
steps:
Expand Down
13 changes: 0 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ All user visible changes to `tigerbeetle-unofficial`, `tigerbeetle-unofficial-co



## master

[Diff](/../../compare/v0.5.0%2B0.16.11...master) | [Milestone](/../../milestone/2)

### BC Breaks

- Bumped up [MSRV] to 1.82 due to used dependencies. ([#36])

[#36]: /../../pull/36




## [0.5.0+0.16.11] · 2024-12-02
[0.5.0+0.16.11]: /../../tree/v0.5.0%2B0.16.11

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ members = ["sys", "core"]
[workspace.package]
version = "0.5.0+0.16.11"
authors = ["Daria Sukhonina <dariasukhonina@gmail.com>"]
rust-version = "1.82"
rust-version = "1.78"
repository = "https://github.com/tigerbeetle-rust/tigerbeetle-unofficial"
license = "MIT OR Apache-2.0"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========================

[![crates.io](https://img.shields.io/crates/v/tigerbeetle-unofficial.svg "crates.io")](https://crates.io/crates/tigerbeetle-unofficial)
[![Rust 1.82+](https://img.shields.io/badge/rustc-1.82+-lightgray.svg "Rust 1.82+")](https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html)
[![Rust 1.78+](https://img.shields.io/badge/rustc-1.78+-lightgray.svg "Rust 1.78+")](https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html)
[![CI](https://github.com/tigerbeetle-rust/tigerbeetle-unofficial/workflows/CI/badge.svg?branch=master "CI")](https://github.com/tigerbeetle-rust/tigerbeetle-unofficial/actions?query=workflow%3ACI+branch%3Amaster)
[![Rust docs](https://docs.rs/tigerbeetle-unofficial/badge.svg "Rust docs")](https://docs.rs/tigerbeetle-unofficial)

Expand Down
6 changes: 6 additions & 0 deletions sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ fn main() {
fs::copy("src/wrapper.h", &wrapper).expect("copying `wrapper.h`");
};

// TODO: Detect automatically, without bringing in heavy dependencies like `cargo-metadata`.
// MSRV: 1.78.0
let msrv = bindgen::RustTarget::stable(78, 0)
.unwrap_or_else(|e| panic!("invalid MSRV specified for `bindgen`: {e}"));

let bindings = bindgen::Builder::default()
.rust_target(msrv)
.header(
wrapper
.to_str()
Expand Down

0 comments on commit e175957

Please sign in to comment.