-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support platform specific dependencies #9
Conversation
a284b08
to
f2372e7
Compare
@sirwindfield this approach seems to work quite well, do you think it covers your needs for #5? |
This is currently untested in CI.
winapi is giving me headaches, and I don't have a Windows machine to debug the issues on.
9c765b0
to
6ce06e6
Compare
Looks good! What problems did you encounter when trying to add Windows? |
The winapi crate was giving me some issues. I think it's just about enabling the right flag (looks like normally the build script takes care of that), but without an interactive windows environment to test I couldn't get things to build. If someone has access to a Windows machine and can get this sorted, that would be awesome 😊 |
google/cargo-raze#41 contains a good amount of code related to special crates. Might come handy :) |
Add
select({})
s to deps attributes that select dependencies based on the rules_rust target platform matched. This allows generating a singlecargo_dependencies.bzl
file that can be used for any target triple.For now we only support 64-bit Linux and Mac. Other targets should work too, but we cannot test them with the currrent CI setup.
Builds on https://github.com/SirWindfield/blackjack/pull/1 to retrieve the correct
cargo
executable on all platforms and pass the cargo executable and manifest paths inargs
.I would like to add support for windows too (and got pretty far into supporting that), but ran into some issues with
winapi
, which is hard for me to debug without access to a Windows machine outside of CI.