The release build (ex. for ctru-rs examples) was doing some extra optimizations and throwing away the submodules of this crate after the refactor split it into multiple files.
For some reason if the init call is behind another function call, it is as if it doesn't exist. Luckily forcing inlining makes sure the module doesn't get thrown away.
The thread::attr init call also needs to appear in the top level init, otherwise you still get link errors.
Fixes https://github.com/Meziu/ctru-rs/issues/51
The release build (ex. for ctru-rs examples) was doing some extra optimizations and throwing away the submodules of this crate after the refactor split it into multiple files.
For some reason if the init call is behind another function call, it is as if it doesn't exist. Luckily forcing inlining makes sure the module doesn't get thrown away.
The
thread::attr
init call also needs to appear in the top level init, otherwise you still get link errors.