-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cargo.toml should include supported platforms info #1911
Comments
@alexcrichton how do I get feedback on this? Should this be a RFC? |
Yeah I'd recommend starting out with a discussion on internals or users to see if others have feedback, and then eventually there'd need to be an RFC for this. I would personally not want to dive too much into this space, we've already got a number of pain points of platform-specific logic in Cargo.toml. In general we've gotten a whole lot more mileage for pushing this kind of logic into the source code rather than Cargo itself. I also generally feel that lots of infrastructure for just a better error message may not always be worth it, but there may be some other benefits we could get here as well maybe? |
@alexcrichton I understand. |
What's the state of platform-specific dependencies in 2018 cargo? |
Platform-specific dependencies are supported through either: [target.wasm32-unknown-unknown.dependencies] # full target name
# ...
[target.'cfg(windows)'.dependencies] # `cfg` expressions
# ... I think this issue though is moreso about explicitly specifying platform-support in Cargo.toml to have Cargo print a better error message about "This crate doesn't compile or work on Windows", for example, than being about platform-specific dependencies. |
Some crates are platform dependent. It will be nice if this dependency can be advertised in the Cargo.toml file. When building a crate on a system, the cargo binary can then use this info to determine if any of the dependencies do not support this platform. This will help in erring out early while building a crate.
The text was updated successfully, but these errors were encountered: