Skip to content

Conversation

nakajimayoshi
Copy link

@nakajimayoshi nakajimayoshi commented Mar 22, 2025

This change updates the crate to be compatible with the latest edition of rust (2024 as of creating this). without introducing any breaking API changes.

I have squashed some of the existing compiler errors but the vast majority seem to be stemming from a bindgen rust file that's generated at compile time.

Edit: I managed to get rid of the build errors by updating bindgen to the latest version

@nakajimayoshi nakajimayoshi changed the title update rust edition & make clippy changes update rust edition to 2024 Mar 22, 2025
@nakajimayoshi nakajimayoshi changed the title update rust edition to 2024 chore: update rust edition to 2024 Mar 22, 2025
@nakajimayoshi nakajimayoshi marked this pull request as ready for review March 22, 2025 01:41
Copy link
Contributor

@Gurgel100 Gurgel100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nakajimayoshi
Copy link
Author

nakajimayoshi commented Jul 19, 2025

@Gurgel100
Some additional changes to get clippy to work:

Disable layout tests in Bindgen

The MSFS SDK headers use interfaces with virtual methods. You can't really perform meaningful layout tests when you're interacting with these types via opaque pointers instead of passing by value.

#![allow(unsafe_op_in_unsafe_fn)]

Adding unsafe blocks to the bodies of all the unsafe functions would involve adding more boilerplate to the build.rs file than is needed, for no additional safety benefit. The functions themselves are already marked as unsafe.

@nakajimayoshi nakajimayoshi requested a review from Gurgel100 July 19, 2025 12:07
Co-authored-by: Pascal Störzbach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants