Open HybridEidolon opened 7 years ago
Probably not a bad idea in general, though there are a few roadblocks in the way right now. The main thing is that build scripts depend on the standard library, but Xargo replaces libstd with ctr-std, which leaves build scripts without access to std::env
or other modules that they normally use for input and output. I'm not sure exactly why that happens, as build scripts work just fine in the template project (which is why I moved the libctru-linking code there for now).
Maybe it can be fixed by changing the way Xargo stages the sysroot, but I haven't found a solution to the issue quite yet.
This would ensure that the ctru-rs linked is compatible with the libctru version in use; if it is possible, this could be set behind a crate feature to use the system-local libctru.
Downstream, any apps that also link in C dependencies would have to ensure that they do not link the system libctru in addition to the ctru-sys provided one, hence why a feature flag might be useful here.
Just a convenience feature, not sure if it has any real practical use besides maybe unit testing in a docker container or something.