rust3ds / ctru-rs

Rust wrapper for libctru
https://rust3ds.github.io/ctru-rs/
Other
116 stars 17 forks source link

Catch conflicts with libc and stop generating them #186

Closed ian-h-chamberlain closed 2 months ago

ian-h-chamberlain commented 2 months ago

Basically, we can use a builtin lint to catch the scenario where we are accidentally re-generating a different type from libc.

When I tried it out using a little bit of mod and re-exporting, I found a number of cases where we were generating the same types, which might have led to some incompatibilities if we had e.g. layout mismatches from the libc types. This in combination with #181 should help us catch any weird differences between the libc definitions and libctru as well.

Meziu commented 2 months ago

Great find! This is going to help with the issues reported in #174, and give a bit of stability to our building suite.

Gotta love those regressions in the latest nightly, I will push a fix to the Rust tree.

Meziu commented 2 months ago

Opened https://github.com/rust-lang/rust/pull/124649 to fix the latest nightly issues.