Closed jtraglia closed 1 year ago
The reason for adhering to older version is that we're reluctant to stick a pin in MSRV, because in its core blst is not reliant on "flashy" Rust features and there is no real reason to drive the dependents up the version ladder. Of course blst has own dependencies and one can't go lower than that. For example MSRV for cc-rs is 1.46. zeroize unfortunately has raised their MSRV to 1.56, but application developer can pin it to 1.3 and it's verified to work.
Now, one can note that blst's cargo test won't work with Rust version prior 1.56, and that it's probably impractical to make it work, but the ability to execute the tests doesn't actually vouch for the core's MSRV when used as dependency.
As for bindgen itself. It was observed to go "out of sync" with Rust earlier, like generating code that was triggering warnings. This is why it was kind of pinned. Well, with the "cargo test" thing in mind, it's might be reasonable to switch to a newer bindgen, because the things that are different are in the tests... I'll look into it...
Formally speaking it's kind of a step back, because the addr_of!
is used within unsafe block. As opposed to now-gone custom offsetof!
that is. I can imagine that some would argue *ptr
with uninit()
variables constitutes undefined behaviour, but they would have to bring it up with bindgen;-) Thanks!
When trying to generate these for myself, I noticed things were a bit outdated.
cargo install bindgen-cli
now.--size_t-is-usize
flag as it's no longer available.rust-bindgen
(v0.65.1).offsetof
macro which is now unused.