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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions citro3d-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

.must_use_type("Result")
.blocklist_type("u(8|16|32|64)")
.blocklist_type("FILE")
.opaque_type("(GPU|GFX)_.*")
.opaque_type("float24Uniform_s")
.allowlist_file(".*/c3d/.*[.]h")
Expand Down
2 changes: 1 addition & 1 deletion citro3d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ approx = ["dep:approx"]
glam = ["dep:glam"]

[dev-dependencies]
test-runner = { git = "https://github.com/rust3ds/test-runner.git" }
test-runner = { git = "https://github.com/rust3ds/ctru-rs.git" }

[dev-dependencies.citro3d]
# Basically, this works like `cargo 3ds test --features ...` for building tests
Expand Down
Loading