You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build.rs conflicts with downstream projects on Windows (CVT1100: duplicate resource) #373
The recent change #274 that added winresource to build.rs causes linking failures when pet is used as a library dependency on Windows.
When pet is compiled as a library for another binary crate (e.g. Zed), the build.rs unconditionally executes and embeds a VERSIONINFO resource. If the parent crate also defines its own Windows resources (which is standard for Windows applications), the linker receives two sets of version resources with the same ID (Type: 16, Name: 1), leading to a fatal error.
Below is the error message when I'm trying to build Zed after updating the pet dependency:
CVTRES : fatal error CVT1100: duplicate resource. type: VERSION, name: 1, language: 0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
The linker is receiving two VERSIONINFO resources: one from zed itself and one from pet's build.rs output. This happens because pet's build.rs does not check if it's being built as a library or a binary.
Activity
Only embed Windows resources for binary targets (#374)