-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Problem
There are a few related issues to this: #5896 is maybe the closest.
Concrete example:
I want to use the webbrowser crate.
webbrowser depends on jni for target_os = android
https://github.com/amodm/webbrowser-rs/blob/eff4ccbfd373e88df5dbfd6337eabd69b60b08be/Cargo.toml#L34-L35
The latest released jni depends on windows-sys for target = windows
Independent of build target this version of windows-sys will never be used.
Proposed Solution
Have the resolver figure out that windows-sys 0.45 will never be a dependency of webbrowser and therefore not of my project.
Notes
Now, I realize that one says target_os and the other is just the general "windows", so maybe it depends on that. But if the resolution could take these things into account (which I do not think it does, even if it using target_os = "windows", but correct me if I am wrong), that will help de-bloating Cargo.lock.