Skip to content

Allow windows-sys versions >=0.59, <=0.61, delete Cargo.lock#32

Closed
ColinFinck wants to merge 1 commit intotesuji:mainfrom
ColinFinck:update-deps-2026-01
Closed

Allow windows-sys versions >=0.59, <=0.61, delete Cargo.lock#32
ColinFinck wants to merge 1 commit intotesuji:mainfrom
ColinFinck:update-deps-2026-01

Conversation

@ColinFinck
Copy link
Contributor

This PR is the result of cargo upgrade --incompatible --pinned --ignore-rust-version --recursive.

In particular, windows-sys 0.61.x consistently uses raw-dylib for importing APIs from Windows DLLs. This makes a huge difference when using non-MSVC toolchains to build Windows binaries, e.g. x86_64-pc-windows-gnullvm.

CC @tesuji

@ColinFinck ColinFinck changed the title Upgrade dependencies, in particular windows-sys to 0.61 Allow windows-sys versions >=0.59, <=0.61, delete Cargo.lock Jan 16, 2026
@ColinFinck
Copy link
Contributor Author

@tesuji: Thanks for quickly having a look! I checked this once more and came to the conclusion that it's better to use the version range ">=0.59, <=0.61" for windows-sys here. This is also what Microsoft recommends in https://crates.io/crates/windows-sys/0.61.2

However, for that to work, I needed to remove the Cargo.lock file. I also added it to .gitignore: Your project is a library and those shouldn't have the Cargo.lock files committed to allow for any compatible dependency version. See https://doc.rust-lang.org/1.71.1/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

Copy link
Owner

@tesuji tesuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://doc.rust-lang.org/1.71.1/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

This suggestion was deprecated and removed more than one year ago.

Did >=0.59, <=0.61 make the lock file hard to be resolved?

@tesuji
Copy link
Owner

tesuji commented Jan 17, 2026

Merged in 5ca22fd and published in v1.4.0.

Thank you for your contribution.

@tesuji tesuji closed this Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants