Releases: microsoft/windows-rs
71
This is a relatively small release to publish the workaround for a Cargo bug that affects vendoring. #3774
All of the published crates get a minor update for the workaround (#3785) while the windows-bindgen
crate gets a major update as it also includes a new warning for when rustfmt fails (#3778) and this is a breaking change.
What's Changed
- Clippy workflow also needs
rustfmt
to be installed by @kennykerr in #3779 - Add
windows-bindgen
warning whenrustfmt
fails by @kennykerr in #3778 - style: trim trailing whitespace by @ErichDonGubler in #3784
- Add
readme
workaround forCargo.toml
files by @kennykerr in #3785 - Release 71 by @kennykerr in #3786
- Add readme existence check to package validation by @kennykerr in #3787
New Contributors
- @ErichDonGubler made their first contribution in #3784
Full Changelog: 70...71
70
This release provides a few notable additions and features:
- An option to disable the default agility for COM implementations (#3770).
- Improved code generation dependency targeting (#3763).
- Ability to query OS revision number (#3752).
- Updated readme guidance on version ranges (#3754).
Major version updates to existing crates
The windows-bindgen crate (0.64.0) provides improved dependency targeting support via the new --specific-deps
option (#3763).
Minor version updates to existing crates
The windows-implement crate (0.60.1) adds the ability to disable the default agility for COM implementations (#3770).
The windows-version crate (0.1.6) adds the ability to query OS revision number (#3752).
The windows crate (0.62.1) crate has been updated to depend on the latest version of the windows-implement
crate and update the readme with version range guidance.
The windows-collections crate (0.3.1) crate has been updated to depend on the latest version of the windows-implement
crate.
The windows-core crate (0.62.1) crate has been updated to depend on the latest version of the windows-implement
crate.
The windows-future crate (0.3.1) crate has been updated to depend on the latest version of the windows-implement
crate.
The windows-sys crate (0.61.1) crate has an updated readme with version range guidance.
The windows-targets crate (0.53.4) crate has an updated readme indicating that windows-link should be preferred.
What's Changed
- Bump actions/stale from 9 to 10 by @dependabot[bot] in #3744
- Bump actions/setup-node from 4 to 5 by @dependabot[bot] in #3745
- Remove unused
stale.yml
workflow by @kennykerr in #3747 - Fix new
cast_slice_from_raw_parts
clippy lint by @kennykerr in #3750 - Remove workaround for
with_exposed_provenance_mut
by @kennykerr in #3749 - Add query for OS revision number to
windows-version
crate by @kennykerr in #3752 - docs: update README to include guidance on using looser semver ranges for dependencies by @wmmc88 in #3754
- Improve
windows-bindgen
dependency targeting consistency and flexibility by @kennykerr in #3763 - Add option to disable default agility for COM
implement
macro by @kennykerr in #3770 - Install
rustfmt
as part of the build by @kennykerr in #3772 - Release 70 by @kennykerr in #3771
New Contributors
Full Changelog: 69...70
69
This release is focused on upgrading the ecosystem to standardize on the windows-link crate for universal raw-dylib
support on Windows. This avoids all kinds of build complexity and undesirable complexity in dealing with the linker directly via import libs.
To date, the only major Windows crate that still uses the older windows-targets crate for linking is the windows-sys crate. This release updates windows-sys
to depend on windows-link
and thus raw-dylib
unconditionally. This is required for some internal OS and Azure scenarios. It should also meaningfully reduce build time in general since the large windows-targets
import lib crates no longer need to be downloaded at all.
I am also using this release as an opportunity to update all of the remaining crates to use the latest version of windows-link
which itself receives a major update to finally stop overwriting the ABI (#3689), fixing a cross-target compatibility issue.
With this update, Rust for Windows no longer offers any crates that depend on the windows-targets
crate. Although very stable, it will remain supported by this repo for the foreseeable future should there ever be a reason to service it. I do not however plan to provide any non-essential updates to the windows-targets
crate. You should instead use the windows-link
crate.
Major version updates to existing crates
The windows-bindgen crate (0.63.0) includes updated Windows metadata (#3729) and targets the latest version of the core Windows crates.
The windows-link crate (0.2.0) no longer overwrites the ABI (#3689) avoiding cross-arch incompatibility but is unfortunately a subtle breaking change.
The windows-sys crate (0.61.0) is updated to target the latest windows-link
crate and thus raw-dylib
(#3724).
The windows crate (0.62.0) is updated to target the latest windows-core
crate and provides an API refresh for Windows metadata (#3729).
The windows-core crate (0.62.0) provides a number of improvements for compatibility and target support.
The windows-collections crate (0.3.0) is updated to target the latest windows-core
crate.
The windows-future crate (0.3.0) is updated to target the latest windows-core
crate and provides new join
and when
functions for simplifying async continuation (#3708).
The windows-numerics crate (0.3.0) is updated to target the latest windows-core
crate.
The windows-registry crate (0.6.0) is updated to target the latest windows-link
crate.
The windows-result crate (0.4.0) is updated to target the latest windows-link
crate.
The windows-services crate (0.26.0) is updated to target the latest windows-link
crate.
The windows-strings crate (0.5.0) is updated to target the latest windows-link
crate.
The windows-threading crate (0.2.0) is updated to target the latest windows-link
crate and sports a new pool scope for lifetime management (#3696).
Minor version updates to existing crates
The cppwinrt crate (0.3.3) is updated to target the new version of the windows-link
crate.
The windows-version crate (0.1.5) is updated to target the new version of the windows-link
crate.
What's Changed
- Use
--no-allow
for internal bindings to improve static analysis coverage by @kennykerr in #3686 - Update Windows on Arm workflow by @riverar in #3680
- Stop overwriting the ABI in
windows-link
by @kennykerr in #3689 - Address most Clippy warnings in test code by @kennykerr in #3691
- Turn on Clippy testing for all crates and tests by @kennykerr in #3692
- Add specific test coverage for activation by @kennykerr in #3697
- Add specific test for
interface
macro-> Result
transformation by @kennykerr in #3698 - Resolve
from_win32
confusion fromwindows-result
by @kennykerr in #3701 - The internal
windows-core
bindings need not be public by @kennykerr in #3702 - Make use of more prelude items by @kennykerr in #3703
- Properly locate and simplify the
ArrayProxy
type support ABI by @kennykerr in #3704 - Delegate closures should be immutable by @kennykerr in #3706
- Update to latest GitHub runner for Windows by @kennykerr in #3709
- Bump actions/checkout from 4 to 5 by @kennykerr in #3712
- windows-threading: Implement
scope
forPool
by @ChrisDenton in #3696 - Add specific yml job names by @kennykerr in #3715
- Add
Debug
implementation forHStringBuilder
by @kennykerr in #3713 - Prefer
expect
toallow
for Rust and Clippy lints by @kennykerr in #3716 - Adds Cargo package validation by @kennykerr in #3714
- Update
windows-future
withjoin
andwhen
functions by @kennykerr in #3708 - Apply changes for
use_self
Clippy lint to hand-written code by @kennykerr in #3718 - Add
Debug
implementation forArray<T>
by @kennykerr in #3720 - Assume default
readme
fields inCargo.toml
by @kennykerr in #3721 - Remove a few unnecessary wraps - private functions that only return
Ok
orSome
by @kennykerr in #3722 - Switch
windows-sys
to usewindows-link
and thusraw-dylib
by @kennykerr in #3724 - Enforce workspace lints to all workspace crates by @kennykerr in #3726
- Simpler lifetime syntax to improve readability by @kennykerr in #3727
- Add missing
unsafe
onextern
blocks by @kennykerr in #3728 - Update Windows Runtime metadata by @kennykerr in #3729
- Workaround for
integer_to_ptr_transmutes
warning by @kennykerr in #3731 - Simplify construction of
Ref
andOutRef
directly by @kennykerr in #3730 - Add Rust for Windows book and create unified docs/web area by @riverar in #3733
- Add environment to web workflow by @riverar in #3738
- Avoid running test suite for web changes by @riverar in #3739
- Remove
ole32.dll
dependency fromwindows-core
crate for compatibility by @kennykerr in #3743 - Release 69 by @kennykerr in #3741
Full Changelog: 68...69
68
This releases focuses on two distinct crates that have been updated and are in need of a release. While many other improvements and fixes have occurred this month - see what's changed below - no other pressing updates are required and those changes will accrue to a future release.
Major version updates to existing crates
The windows-services crate (0.25.0) introduces a range of powerful updates for supporting different hosting, testing, fallback, and extended commands (#3662).
Minor version updates to existing crates
The windows-targets crate (0.53.3) now forwards the link
macro for raw-dylib
support to the newer windows-link crate rather than implementing it directly (#3670).
What's Changed
- Remove "deprecated" feature by @kennykerr in #3638
- Fix new nightly Clippy warning by @kennykerr in #3649
- Update
toml
dependency from 0.8 to 0.9 by @kennykerr in #3655 - Replace
CoCreateGuid
withUuidCreate
to avoidole32.dll
dependency by @kennykerr in #3656 - Add simple C# interop sample/test by @kennykerr in #3657
- Add error handling and string test for C# interop by @kennykerr in #3658
- Fix new Rust nightly warnings by @kennykerr in #3659
- Fix nightly Clippy warning by @kennykerr in #3665
- Fix use-after-free in json_validator sample by @riverar in #3668
- The
windows
crate's "std" feature should enable dependent "std" features by @kennykerr in #3666 - Windows service improvements for hosting, testing, fallback, and extended commands by @kennykerr in #3662
- Clarify and test extern abi workaround for variadic function support by @kennykerr in #3669
- Forward
link
macro forraw-dylib
support by @kennykerr in #3670 - Add reminder to remove hardcoded "C" before next major update by @kennykerr in #3671
- windows: Use new
hints.mostly-unused
by @joshtriplett in #3660 - Parameterize fix-environment action by @riverar in #3677
- Apply clippy workflow to all but tests by @kennykerr in #3675
- Minor release of
windows-targets
by @kennykerr in #3683 - Major release of
windows-services
by @kennykerr in #3684
New Contributors
- @joshtriplett made their first contribution in #3660
Full Changelog: 67...68
67
As requested here, this minor update to the windows-registry crate adds support for volatile registry keys (#3632).
What's Changed
- Fix for nightly
unpredictable_function_pointer_comparisons
warning by @kennykerr in #3633 - Add support for volatile registry keys in
OpenOptions
by @copilot-swe-agent in #3632 - Release 67 by @kennykerr in #3639
Full Changelog: 66...67
66
This release is primarily to publish #3622, the fix for rust-lang/rust#142330, and make it available to dependent crates and afford them a path forward.
Major version updates to existing crates
The window-sys crate (0.60.1) receives its first update in 11 months to address this issue and update its dependency on the windows-targets crate. This is a major update since metadata changes have caused breaking changes in the generated code.
The windows-bindgen crate (0.62.1) receives an update to correctly generate the link
macros using the appropriate calling convention as per #3622. This is a major update since generated code may change.
The cppwinrt crate (0.3.1) is updated to provide access to the recently published version of the cppwinrt compiler. This is a major update since the compiler and base library has some breaking changes.
Minor version updates to existing crates
The windows crate (0.61.2) has been updated to address the calling convention future incomparability warnings. This is a minor update since this is the only change since the last release and is itself not considered a breaking change.
The windows-link crate (0.1.2) and the windows-targets crate (0.53.1) have been updated to address the calling convention future incomparability warnings. This is a minor update since this is the only change since the last release and is itself not considered a breaking change.
What's Changed
- Apply
must_use
to thebindgen
function by @kennykerr in #3605 - Update
rand
dependency inDirectComposition
sample by @kennykerr in #3611 - Add item indexing support to
windows-metadata
by @kennykerr in #3612 - Add
bindgen
argument documentation by @kennykerr in #3617 - Address new lifetime errors in Rust 1.89 by @kennykerr in #3620
- Update
cppwinrt
crate to 2.0.250303.1 by @kennykerr in #3619 - Use
extern "C"
instead ofextern "cdecl"
by @ChrisDenton in #3622 - Release 66 by @kennykerr in #3624
Full Changelog: 65...66
65
This is a quick workaround for what appears to be a cargo vendor
issue that fails to include some files that are otherwise included by cargo package
(#3607).
There are no new crates or major updates in this release.
Minor version updates to existing crates
- The windows-core crate has been update with a workaround for
cargo vendor
support (#3607). - The windows-result crate has been update with a workaround for
cargo vendor
support (#3607). - The windows-strings crate has been update with a workaround for
cargo vendor
support (#3607).
What's Changed
.natvis
workaround forcargo vendor
by @kennykerr in #3607- Release 65 by @kennykerr in #3608
Full Changelog: 64...65
64
New crates in this release
- The windows-services crate provides a simple and safe way to implement Windows services in Rust (#3599).
- The windows-threading crate provides simple, safe, and efficient access to the Windows threading support (#3595).
Major version updates to existing crates
- The windows-metadata crate is a low-level metadata library for ECMA-335, providing both a reader and writer for the ECMA-335 metadata format (#3560) used by .NET, WinRT, and more recently the Win32 metadata. It is technically a brand new implementation but reuses the older crate name from my first attempt at a metadata parser in Rust. The emphasis is on low-level. While it is easy to use, the metadata format is intended for tools to use internally. This implementation is very fast and scalable.
Minor version updates to existing crates
- The windows-bindgen crate has been updated to use the new
windows-threading
crate for parallelism to improve reliability and reduce dependencies (#3588, #3595). - The windows-future crate now uses the new
windows-threading
crate for parallelism (#3595). - The windows-registry crate adds support for key rename (#3567).
- The windows-core, windows-result, and windows-strings crates no longer require the
windows_debugger_visualizer
option to enable natvis support (#3586).
What's Changed
- Mark stale issues and pull requests by @kennykerr in #3550
- Fix circular dependency by @kennykerr in #3549
- Fix semver compatibility issue by @kennykerr in #3554
- Low-level metadata library for ECMA-335 by @kennykerr in #3560
- Add fast indexing support to
windows-ecma335
by @kennykerr in #3562 - Derive
Hash
forType
inwindows_registry
by @allan2 in #3564 - Add key rename support to the
windows-registry
crate by @kennykerr in #3567 - Collapse internal config/writer structures inside
windows-bindgen
by @kennykerr in #3569 - Add Windows on Arm test coverage by @riverar in #3577
- Remove extra call of
message()
inError
formatting by @CrazyboyQCD in #3579 - Clarify contributing guide by @kennykerr in #3584
- Fix nightly clippy warnings by @kennykerr in #3585
- Remove
windows_debugger_visualizer
ascfg
option by @kennykerr in #3586 - Remove MacOS testing by @kennykerr in #3587
- Remove
rayon
dependency by @kennykerr in #3588 - Adds a Windows service example by @kennykerr in #3590
- Introduce the dedicated
windows-threading
crate by @kennykerr in #3595 - Restrict
allow
to bindings inwindows-threading
crate by @kennykerr in #3597 - Introduce the dedicated
windows-services
crate by @kennykerr in #3599 - Fix typos by @kennykerr in #3600
- Rename
windows-ecma335
towindows-metadata
by @kennykerr in #3601 - Release 64 by @kennykerr in #3603
New Contributors
- @allan2 made their first contribution in #3564
- @CrazyboyQCD made their first contribution in #3579
Full Changelog: 63...64
63
Note: I've switched to numeric release and tag numbers (e.g. 63 instead of 0.63.0) to avoid confusing releases with crate versions, which are independent of the release name and git tag.
Major updates to existing crates
windows - this update adds marshaling support for COM implementations inside the windows
crate (#3531), remapping of more numeric types to the windows-numerics
crate (#3524), detection of nested structs with differing layout or packing requirements (#3522), and other minor fixes.
windows-bindgen - this update adds marshaling support for COM implementations generated by windows-bindgen
such as delegates (#3531), detection of nested structs with differing layout or packing requirements (#3522), deriving Default
in more cases (#3520), and other minor fixes.
windows-core - this update adds the core marshaling implementation used by the windows-bindgen
crate and all other Windows code including COM implementations, delegates, and weak references (#3531). The windows-core
crate also includes minor improvements to COM authoring support.
windows-implement - this update adds plumbing to hook the windows-core
crate's marshaling support into all COM implementations (#3531).
windows-numerics - this update adds scale
and skew
functions to Matrix3x2
.
windows-strings - this update introduces a small breaking change to the h!
macro for creating HSTRING
literals in compliance with Edition 2024 (#3530) and Miri test coverage (#3535).
windows-collections - updates dependencies with minor improvements to documentation.
windows-future - updates dependencies with minor improvements to documentation and adds COM marshaling support to async delegates (#3531).
Minor updates to existing crates
cppwinrt - updates dependencies with no visible changes.
windows-interface - updates dependencies with minor improvements to documentation.
windows-link - updates linker correctness on Linux.
windows-registry - updates dependencies with no visible changes.
windows-result - updates dependencies with no visible changes.
windows-version - updates dependencies with no visible changes.
What's Changed
- 0.62.1 by @kennykerr in #3503
- Automate yml workflow generation for MSRV checks by @kennykerr in #3504
- Remove
cast
fromimplement
macro by @sivadeilra in #3506 - Remove
IUnknownImpl::from_inner_ref
as no longer needed by @sivadeilra in #3513 - Restore and extend feature index generation with method support by @riverar in #3486
- Remove
features.json
specific towindows-sys
by @kennykerr in #3515 - Simplify and refactor the
implement
macro by @sivadeilra in #3507 - Simplify
tool_yml
and extend Clippy coverage by @kennykerr in #3516 - Avoid
OutRef
for array parameters inwindows-bindgen
by @kennykerr in #3517 - Derive
Default
for more structs by @kennykerr in #3519 - Implement
Default
forsys
style structs by @kennykerr in #3520 - Detect nested structs with differing layout or packing requirements by @kennykerr in #3522
- Remap common numeric types by @kennykerr in #3524
- Hide vtables in docs by @kennykerr in #3526
- Add
scale
andskew
functions toMatrix3x2
by @robmikh in #3527 - Add dedicated test crate for
windows-numerics
by @kennykerr in #3529 - Tweaks to support Edition 2024 of Rust in future by @kennykerr in #3530
- Add marshaling support for COM implementations by @kennykerr in #3531
- Add basic Miri testing by @kennykerr in #3535
- Limit unsafe code in
windows-version
crate by @kennykerr in #3536 - Port ECMA-335 fixes for correctness by @kennykerr in #3537
- Cleanup and remove unnecessary internal bindings by @kennykerr in #3542
- Correct minor typos by @utilForever in #3544
- Improve workspace dependency management by @kennykerr in #3546
- Simpler toml configuration by @kennykerr in #3547
- Release 63 by @kennykerr in #3548
New Contributors
- @utilForever made their first contribution in #3544
Full Changelog: 0.62.0...63
62
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