Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test runner dependency update #50

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Test runner dependency update #50

merged 1 commit into from
Jun 18, 2024

Conversation

Meziu
Copy link
Member

@Meziu Meziu commented Jun 16, 2024

Small PR to update the dependency requirement for citro3d.

@ian-h-chamberlain I'm also encountering a small issue with bindgen trying to generate the FILE type (and failing miserably at doing so). I don't understand why it's unable to use the libc type instead (so I hacked a very stupid fix just to run the example). Anything that can be done about it?

@@ -66,8 +66,10 @@ fn main() {
.prepend_enum_name(false)
.fit_macro_constants(true)
.raw_line("use ctru_sys::*;")
.raw_line("use libc::FILE;")
Copy link
Member

Choose a reason for hiding this comment

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

About this conflict with libc:: types... in rust3ds/ctru-rs#186 I thought I had to do something similar, but I don't think anything actually uses the FILE type in ctru-sys, somehow.

I actually started working on a similar PR with #49 and it looks like I ended up just doing the same blocklist_type there ultimately. The reason I haven't undrafted that yet is that it requires rust-lang/rust-bindgen#2836 to avoid conflicting with ctru-sys, which hasn't been merged yet either 😢


In any case, I think the raw_line and blocklist_type approach you've got here is fine. From what I can tell, ctypes_prefix only applies to fundamental types like c_int and c_char, not to other more complicated libc types like FILE, timeval etc. So I think what you have here is about as correct as it can be, and although I would normally expect .blocklist_file(".*/sys/.*[.]h") to be sufficient, in this case I guess it's not.

@Meziu
Copy link
Member Author

Meziu commented Jun 18, 2024

Merging as the CI failures are caused by rust3ds/cargo-3ds#63.

@Meziu Meziu merged commit bb643c7 into main Jun 18, 2024
4 of 6 checks passed
@Meziu Meziu deleted the fix/dependency-update branch June 18, 2024 10:17
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