-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Description
Problem:
It is difficult to recognize what targets a crate is compatible with. With WASM coming about, it has become more important to know if a crate is WASM-compatible or not, i.e. builds and runs on a wasm32
architecture. One has to try building the crate for the target manually, and if there are issues one needs to find the dependency which may be causing incompatibility by recursing down the dependency tree, following the compiler errors.
Solution:
[build]
targets = [
"wasm32-unknown-unknown",
"wasm32-wasi",
"x86_64-unknown-linux-gnu",
"i586-pc-windows-msvc",
]
- Allow crate authors to define compatible targets in the crate configuration
- check those targets when publishing the crate
- let cargo make a suggestion to add a target to the list, after target has been checked successfully
- check the compatible targets of dependencies and point out compatibility conflicts
This would make the compatibility visible in the crate, and make it easier to find compatibility issues.
Another idea is to show the compatible targets in the documentation on docs.rs, to make it even easier to see what targets a crate can be run on.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`