servo / font-kit

A cross-platform font loading library written in Rust
Apache License 2.0
693 stars 104 forks source link

Fix build failure when downstream crates attempt to build font-kit on Windows #105

Closed Osspial closed 4 years ago

Osspial commented 5 years ago

When de6fabc got merged, the dependency that loaded winapi's sysinfoapi feature got removed. This fails builds when attempting to build font-kit downstream (i.e. if you depend on git = "https://github.com/pcwalton/font-kit.git" through Cargo.toml), but it does not fail when you run cargo build within font-kit's folder directly.

I don't know why cargo behaves that way. I assume it's a bug. Still, this fixes that behavior by making the sysinfoapi dependency explicit. For good measure, we make all the other winapi dependency features explicit to ensure this same sort of issue doesn't happen again.