-
Notifications
You must be signed in to change notification settings - Fork 104
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 pulling in source dependencies even when the source feature is disabled #229
Comments
The fact that the dependency is pulled in is a limitation of cargo. However it will only be built if it's part of the active dependency graph based on the features selected, since it's marked as an optional dependency. |
Heartbreakingly, I don't think this is quite right in practice.
This is visible in the build output when compiling on Linux:
This passes on my Linux dev machine, where fontconfig is available... but on my embedded system, where it is not available, I get:
If I comment out the previously-linked section of |
I believe that due to rust-lang/cargo#1197 , and the auto-backend-selection approach for font-kit , the only way this issue might be fixable is to introduce an extra package, e.g. "font-kit-core" which has all the current code. Then |
#180 is related to splitting off source related features to a separate crate. |
For example, this section means that compiling for a linux target will always require
fontconfig
to be available, even when thesource
feature is not enabled: https://github.com/servo/font-kit/blob/master/Cargo.toml#L61-L62This means that eg. cross-compiling becomes more difficult, since you now need
fontconfig
compiled for the target system, even though you don't intend to use it.The text was updated successfully, but these errors were encountered: