New crates in this release
-
The windows-collections crate defines the Windows collection types like
IIterable<T>
,IVector<T>
,IMap<K, V>
, and so on (#3483). It also includes all of the stock implementations for creating such collections (#2346, #2350, #2353). This allows these collections to be used without requiring a dependency on the largerwindows
crate. This crate also provides an optimized implementation of the standardIterator
trait for the WindowsIIterator<T>
interface (#3476). -
The windows-future crate defines the Windows async types like
IAsyncAction
,IAsyncOperation<T>
, and so on (#3490). It also includes all of the stock implementations for creating such async types (#3221, #3235). This allows these async types to be used without requiring a dependency on the largerwindows
crate. -
The windows-link crate provides linker support for Windows (#3450). This is the evolution of the older
windows-targets
crate but is substantially simpler and more versatile thanks to advances in the Rust compiler since thewindows-targets
crate was unveiled. Notably, it does not depend on or insert any import libs and can be used with custom libraries, not only those provided by the Windows operating system. All of the crates, with the exception ofwindows-sys
, now depend on the newwindows-link
crate instead of the olderwindows-targets
crate. This greatly simplifies compilation and also greatly reduces the size of dependencies as thewindows-link
crate is tiny. Thewindows-bindgen
crate defaults towindows-link
but also adds the--link
option to override this as needed. You may for example want to use--link windows_targets
if you need to stick with thewindows-targets
crate if you cannot change your MSRV to Rust 1.71 or later as that was the first version to stabilizeraw-dylib
for all Windows targets. This then lets you continue to usewindows-bindgen
until you are ready to move to a newer version of Rust. -
The windows-numerics crate defines the Windows numeric types to support graphics-oriented math APIs and calculations (#3488). It also also includes all of the stock implementations for overloaded operators and other transformations. This allows these numeric types to be used without requiring a dependency on the larger
windows
crate.
Major updates to existing crates
-
The windows-bindgen crate provides a number of improvements including new diagnostics (#3498), streamlined and more capable reference support (#3497, #3492), hardened method overloading (#3477), far fewer
transmute
calls, as well as many other critical fixes and improvements. -
The windows-core crate is largely unchanged but required some breaking changes to support
windows-bindgen
type system improvements. -
The windows-registry crate continues to improve with generalized support for access rights (#3482), open options (#3461), and other minor improvements.
-
The windows crate now delegates to the
windows-numerics
,windows-future
, andwindows-collections
crates for those types, as well as a number of critical fixes and improvements to features andcfg
guards (#3431), and many other small improvements.
Minor updates to existing crates
-
The windows-result now includes the
BOOL
type (#3441) as a core type. This allows this ubiquitous type to be used without requiring a dependency on the largerwindows
crate. -
The windows-strings crate now depends on the new
windows-link
crate instead of the olderwindows-targets
crate. -
The windows-version crate now depends on the new
windows-link
crate instead of the olderwindows-targets
crate. -
The cppwinrt crate includes minor improvements to improve build reliability.
What's Changed
- Use
track_caller
in more places by @kennykerr in #3424 - Allow name and value types in
set_string
to differ by @kerosina in #3412 - Simplify internal
windows-bindgen
caching by @kennykerr in #3427 - Fix test build reliability by @kennykerr in #3429
- Use dedicated arch
cfg
writer by @kennykerr in #3430 - Fix
cfg
generation by @kennykerr in #3431 - Remove
Ref
unused lifetime type parameter by @kennykerr in #3433 - Use
Ref
for generic type parameters by @kennykerr in #3435 - Apply type
cfg
toSend
andSync
implementations by @kennykerr in #3438 - Make
BOOL
a core type by @kennykerr in #3441 - Remap the Win32 definition of
EventRegistrationToken
by @kennykerr in #3445 - Use
Ref
andOutRef
for C++ delegates by @kennykerr in #3447 - Reintroduce
Ref
lifetime type parameter by @kennykerr in #3448 - Introducing the
windows-link
crate by @kennykerr in #3450 - Avoid over-wrapping optional callback parameters by @kennykerr in #3452
- Use unique path for
cppwinrt
temp file by @kennykerr in #3455 - Share result mapping code in
windows-bindgen
and reducetransmute
count by @kennykerr in #3454 - Simplify signature parameter handling inside
windows-bindgen
by @kennykerr in #3456 - Remove workaround for invalid metadata by @kennykerr in #3457
- Simplify dependency tracking by @kennykerr in #3460
- Add
OpenOptions
towindows-registry
by @kennykerr in #3461 - Add
windows-link
to the windows-rs readme by @kennykerr in #3462 - Ensure remaining extensions compile with
no_std
by @kennykerr in #3469 - Harden nested type discovery by @kennykerr in #3471
- Add collection interop testing by @kennykerr in #3473
- Optimize
Iterator
forIIterator<T>
by @kennykerr in #3476 - Harden method overload support by @kennykerr in #3477
- Generalize support for access rights in
windows-registry
by @kennykerr in #3482 - Support metadata with
MethodDef
constructor parent resolution by @kennykerr in #3484 - Introducing the dedicated
windows-collections
crate by @kennykerr in #3483 - Deduplicate required interfaces by @kennykerr in #3487
- Introducing the dedicated
windows-numerics
crate by @kennykerr in #3488 - Introducing the dedicated
windows-future
crate by @kennykerr in #3490 - Improve
windows-bindgen
reference usability and default reference support by @kennykerr in #3492 - Avoid memory explosion when stress testing
bindgen
by @kennykerr in #3496 - Simpler default reference support in
windows-bindgen
by @kennykerr in #3497 - Add optional warnings for
windows-bindgen
to improve diagnostics by @kennykerr in #3498 - Organize library tests by @kennykerr in #3499
- Optimize test coverage by @kennykerr in #3500
- Optimize external packages by @sivadeilra in #3501
- Release 0.62.0 by @kennykerr in #3502
New Contributors
Full Changelog: 0.61.0...0.62.0