Skip to content

Conversation

@CenTdemeern1
Copy link
Contributor

@CenTdemeern1 CenTdemeern1 commented Oct 22, 2025

This removes some code in the build script that uses pacman's output incorrectly and ends up scanning significantly more files than it should, and replaces it with a naive but functional alternative.

libctru is already assumed to be at $DEVKITPRO/libctru earlier in the file:

println!("cargo:rustc-link-search=native={devkitpro}/libctru/lib");

This is slightly more naive because it assumes libctru doesn't place files outside of $DEVKITPRO/libctru, but also it doesn't and obviously shouldn't.

For me warm build times went down from ~20 seconds to <0.2.

Fixes #233 (and #201)

This uses pacman's output incorrectly and ends up scanning significantly more files than it should.
libctru is already assumed to be at $DEVKITPRO/libctru earlier in the file.
This is slightly more naive because it assumes libctru doesn't place files outside of $DEVKITPRO/libctru, but also it doesn't and obviously shouldn't.
For me incremental (hot? warm? the opposite of cold) build times went down from ~20 seconds to <0.2.
@FenrirWolf
Copy link
Member

Looks good to me. I'll have to take another look at that build script later on too. I get the feeling there are other things that could be simplified a little in there, but that would be a story for another time.

@FenrirWolf FenrirWolf merged commit 44e6787 into rust3ds:master Oct 22, 2025
1 of 4 checks passed
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.

ctru-sys build script misuses pacman output and makes cargo scan massive chunks of the FS causing freezes

2 participants