Releases: microsoft/windows-rs
0.41.0
This is a minor service release addressing a number of issues mostly originating from the underlying win32 metadata which have now been resolved.
This release does not include an update to the windows-sys
crate, which remains stable and unchanged.
What's Changed
- Harden win32 array support to avoid conflicting metadata by @kennykerr in #2035
- Don't transform pointers to references by @kennykerr in #2036
- Avoid transforming array parameters with mismatched metadata by @kennykerr in #2037
- Add support for reserved parameters by @kennykerr in #2039
- Add WMI sample by @kennykerr in #2041
- Add macros for creating null-terminated string literals to
windows-sys
by @kennykerr in #2043 - Further constrain transforming array parameters to avoid potentially polymorphic types by @kennykerr in #2046
- Add Natvis definitions for types defined in the
core
module of thewindows
crate by @ridwanabdillahi in #2023 - Add support for declaring interfaces derived from existing interfaces by @kennykerr in #2048
- Update the win32 metadata to version 33.0.18 by @kennykerr in #2050
- Remove dlltool prefix hack by @glandium in #2052
- Separate
Vtable
support fromInterface
trait by @kennykerr in #2051 - Fix
HSTRING
to conform to Rust's aliasing rules by @ChrisDenton in #2057 - Version 0.41.0 by @kennykerr in #2058
New Contributors
- @ridwanabdillahi made their first contribution in #2023
Full Changelog: 0.40.0...0.41.0
0.40.0
This release includes a rollup of fixes and improvements to the Win32 metadata and many small fixes to the Rust bindings themselves. Notably, fixed-size array parameters, APIs with non-system calling conventions such as cdecl
, reproducible builds, and far more accurate import libs.
This release does not include an update to the windows-sys
crate, which remains stable and unchanged.
What's Changed
- Exclude MsHtml APIs by @kennykerr in #1925
- Replace unsafe
strlen
usage in metadata library with safe Rust by @Swatinem in #1926 - Minor FAQ tweaks by @kennykerr in #1929
- Adding documentation for factory by @BenJKuhn in #1936
- Include only Win32 features and modules in the
windows-sys
crate by @kennykerr in #1935 - Use a consistent set of dependencies across the
implement
andinterface
crates by @kennykerr in #1931 - FAQ - What APIs are included? by @kennykerr in #1933
- Declare
rust-version
forwindows-interface
crate by @kennykerr in #1930 - Provide 32-bit aliases for
SetWindowLongPtrA
andGetWindowLongPtrA
by @kennykerr in #1932 - Prefer
&T
to*const T
for Win32 input parameters by @kennykerr in #1939 - Support fixed-size array parameters by @kennykerr in #1941
- Remove hidden dead code in
windows::core
by @kennykerr in #1943 - Remove unnecessary parentheses by @riverar in #1949
- Add
aarch64-pc-windows-gnullvm
andx86_64-pc-windows-gnullvm
targets by @mati865 in #1883 - Make the output of tool_yml more deterministic across machines by @glandium in #1958
- Produce the *_gnu import libraries more deterministically by @glandium in #1967
- Remove unused binding by @kennykerr in #1976
- Remove unnecessary symbols and sections from *_gnu import libs by @glandium in #1968
- Fix msvc lib generation by @kennykerr in #1979
- Implement
Debug
forAgileReference
by @kennykerr in #1986 - Update min rust version for
windows-sys
to 1.49 by @kennykerr in #1987 - Update the faq to call out
no_std
support by @kennykerr in #1992 - Switch to custom bindings for the
windows::core
internals by @kennykerr in #1993 - Add samples readme by @kennykerr in #1991
- Remove unused
bindgen
options by @kennykerr in #1994 - Make
BOOL
,BOOLEAN
, andNTSTATUS
extensions rather than replacements by @kennykerr in #1995 - Update Win32 metadata version from 24.0.1 to 30.0.12 by @kennykerr in #1996
- Add support for calling conventions by @kennykerr in #1999
- Address nightly clippy warnings by @kennykerr in #2000
- Introduce reproducible builds with stable sorting by @kennykerr in #2003
- Adds a workaround and test for
MAKEINTRESOURCE
style constants by @kennykerr in #2007 - Remove Xaml interop namespace by @kennykerr in #2008
- Make
BSTR
a core string type by @kennykerr in #2006 - Update the win32 metadata to version 31.0.4 by @kennykerr in #2009
- Use $crate in s! and w! macros by @goffrie in #2011
- Adds
unsafe
helpers to cast from C++ or rawIUnknown
pointers to RustIUnknown
values by @kennykerr in #2010 - Update the win32 metadata to version 32.0.17 by @kennykerr in #2015
- Remove win32metadata workarounds by @kennykerr in #2017
- Misc. changes to import library generation tooling by @glandium in #2016
- Remove win32metadata workaround by @kennykerr in #2021
- Version 0.40.0 by @kennykerr in #2026
New Contributors
- @Swatinem made their first contribution in #1926
- @BenJKuhn made their first contribution in #1936
- @mati865 made their first contribution in #1883
- @glandium made their first contribution in #1958
- @goffrie made their first contribution in #2011
Full Changelog: 0.39.0...0.40.0
0.39.0
This release includes improves to string handling and parameter passing to both improve performance and simplify the way arguments are bound to API calls.
Notably, the "alloc" feature has been removed. This feature allowed string literals to be implicitly converted to null terminated strings required by some Windows APIs. While convenient, it was rather complicated and expensive at runtime. Instead, the explicit s!
and w!
macros are now provided to create null terminated UTF-8 and UTF-16 string literals at compile time.
This release does not include an update to the windows-sys
crate, which remains stable and unchanged.
What's Changed
- Fix new Rust-1.62 lints by @MarijnS95 in #1866
- Clean up formatting and indetation by @MarijnS95 in #1865
- Support running on Linux/WSL targets by @MarijnS95 in #1863
- Derive
Eq
andPartialEq
forNTSTATUS
by @kennykerr in #1869 - Fix token formatting for
derive
macros by @kennykerr in #1870 - Basic field and constant metadata generation by @kennykerr in #1871
- Add link to metadata used to generate crate in main readme by @poliorcetics in #1875
- Add
tool_lib
crate to hold some of the common support for thewindows-rs
tools by @kennykerr in #1876 - Update win32 metadata to v24 by @kennykerr in #1877
- Move all docs to central location by @kennykerr in #1878
- Adjust license placement for GitHub auto-detection by @riverar in #1879
- Remove old license files by @kennykerr in #1880
- Borrowed by @rylev in #1811
- Use prettyplease for development formatting by @rylev in #1849
- Remove orphaned "alloc" feature by @kennykerr in #1888
- Convertible input strings by @kennykerr in #1889
- Add macros for creating null-terminated string literals by @kennykerr in #1891
- Update samples to use string literal macros by @kennykerr in #1894
- Use
where
clauses in codegen by @rylev in #1893 - Improve string pointer types by @rylev in #1897
- Small refactor by @rylev in #1899
- Avoid including primitive types with convertible types by @kennykerr in #1900
- Remove dead code by @rylev in #1905
- Add display methods for string pointer types by @rylev in #1904
- Avoid
transmute
for binding primitive argument types by @kennykerr in #1907 - Avoid generating redundant doc comments for methods by @kennykerr in #1908
- Infer ABI type for method result type by @kennykerr in #1909
- Avoid
transmute
for direct return values where no translation occurs by @kennykerr in #1911 - More accurate signature parameter parsing by @kennykerr in #1913
- Reduce dependence on
transmute
for WinRT arrays by @kennykerr in #1914 - Ensure that
Display
impl forHSTRING
is infallible by @kennykerr in #1915 - Fix new nightly warning about unused return value by @kennykerr in #1917
- Use internal
Decode
helper in a few more places by @kennykerr in #1918
New Contributors
- @poliorcetics made their first contribution in #1875
Full Changelog: 0.38.0...0.39.0
0.38.0
This release includes a host of small improvements and fixes to the windows
crate. Notably, the windows-bindgen
and windows-metadata
crates have been rewritten to avoid the static winmd cache in favor of a stateful metadata reader that allows multiple instances to be used independently (#1777).
This release does not include an update to the windows-sys
crate, which remains stable and unchanged.
What's Changed
- Small clean ups to factory caching by @rylev in #1758
- Add WinSock conversion utilities by @ryancerium in #1742
- Set windows-implement min rust-version by @wravery in #1773
- Stateful metadata & bindgen by @kennykerr in #1777
- Pay back some technical debt by @kennykerr in #1779
- Remove nightly test distinction by @kennykerr in #1778
- Update Win32 metadata to v23 by @kennykerr in #1783
- Remove unused types by @kennykerr in #1784
- Remove hidden
RawPtr
type alias by @kennykerr in #1791 - Remove need for allocation inside Reader by @rylev in #1794
- Avoid redundant signature calculations by @kennykerr in #1793
- Improve
Reader
toTree
construction by @kennykerr in #1797 - Remove
flatten
comment by @kennykerr in #1801 - Test error propagation by @kennykerr in #1803
- Trim error messages by @kennykerr in #1804
- Remove reverse dependency from core module by @kennykerr in #1802
- Make
Type
methods simpler to use by @kennykerr in #1806 - Add cross compilation tests by @riverar in #1808
- Support COM-style query signatures with unconventional parameter positions by @kennykerr in #1805
- Avoid truncating error codes when converting from
windows::core::Error
tostd::io::Error
by @kennykerr in #1809 Borrowed<'a, T>
RFC by @rylev in #1788- Use standard library algorithm for finding query parameters by @kennykerr in #1810
- Avoid string allocations in
Cfg
by @kennykerr in #1812 - Followup to event PR feedback by @kennykerr in #1814
- Basic metadata generation by @kennykerr in #1820
- Avoid UB in
FactoryCache
by @kennykerr in #1829 - Remove Xaml from
windows
crate by @kennykerr in #1836 - Include
cfg
dependencies for types with generic interface type dependencies by @kennykerr in #1832 - Add
component
helper function to simplify component development by @kennykerr in #1840 - Version 0.38.0 by @kennykerr in #1841
New Contributors
- @ryancerium made their first contribution in #1742
Full Changelog: 0.37.0...0.38.0
0.37.0
This release includes a host of small improvements and fixes to the windows
crate. Notably, changes to the implement
and interface
macros improve interoperability, correctness, and safety for COM and WinRT implementations.
This release does not include an update to the windows-sys
crate, which remains stable and unchanged.
What's Changed
- Avoid double allocation when passing strings via
IntoParam
by @AronParker in #1713 - Correct
compose
offset inimplement
macro by @kennykerr in #1724 - Restore nightly validation by @riverar in #1726
- Correct implementation identity for MBM and .NET compatibility by @kennykerr in #1729
- Fix interface macro to handle qualified IUnknown parent by @rylev in #1732
- Shorten IUnknown check by @rylev in #1735
- Improve
IUnknown
Unsafe Annotations by @rylev in #1734 - Improve the
Interface
trait by @rylev in #1738 - Improve Vtable implementations by @rylev in #1740
- Propose an RFCs Process by @rylev in #1731
- Add
HSTRING
compatibility testing by @kennykerr in #1749 - Simplify header handling in HSTRING by @rylev in #1747
- Use
core::ptr::write
for out params by @rylev in #1750 - Fix
ToImpl
by @rylev in #1748 - Inline
HSTRING::clear
into theDrop
impl by @rylev in #1752 - Make
cast
method produced byimplement
macro unsafe by @rylev in #1753 - Improve ABI conversion by @rylev in #1746
- Add GUID::to_u128 by @GamePad64 in #1756
- Version 0.37.0 by @kennykerr in #1765
New Contributors
- @AronParker made their first contribution in #1713
- @GamePad64 made their first contribution in #1756
Full Changelog: 0.36.1...0.37.0
0.36.1
This is a minor service release to work around docs.rs limitations in order to publish windows-sys
docs.
What's Changed
- Make target crates
no_std
by @ChrisDenton in #1722 - Version 0.36.1 by @kennykerr in #1723
New Contributors
- @ChrisDenton made their first contribution in #1722
Full Changelog: 0.36.0...0.36.1
0.36.0
What's Changed
- Avoid clearing
SetLastError
when allocating string params by @kennykerr in #1665 - Remove UB in the
heap_string
function by @rylev in #1667 - Add test component by @kennykerr in #1666
- Document heap functions by @rylev in #1670
- Heap functions are private by @kennykerr in #1673
- Correct x86 stdcall signature size calculation by @kennykerr in #1674
- Replace internal
IActivationFactory
definition with tailored definition by @kennykerr in #1678 - Add the beginnings of an FAQ by @rylev in #1684
- Added conversions between
HSTRING
andOsStr
/OsString
by @kaivol in #1693 - Make
Matrix3x2::identity()
andMatrix3x2::translation(f32, f32)
const by @TheOddGarlic in #1695 - Add missing features to enum bitwise operators by @kennykerr in #1701
- Update win32 metadata to 22.0.14-preview by @kennykerr in #1702
- Add
Event<T>
type that can be used to implement a WinRT event by @kennykerr in #1705 - Undo Rust 2021 adoption by @kennykerr in #1706
- Remove redundant warning suppression by @kennykerr in #1709
- Version 0.36.0 by @kennykerr in #1717
New Contributors
Full Changelog: 0.35.0...0.36.0
0.35.0
What's Changed
- Update Windows metadata, import libraries by @riverar in #1604
- Support richer COM interface hierarchies by @rylev in #1608
- Fix bug where COM interfaces needed to be declared pub by @rylev in #1611
- Fix bug where the
interface
feature could not be used without theimplement
feature by @rylev in #1612 - Update metadata, regen crates by @riverar in #1613
- Make a safer conversion From for INTERFACE by @rylev in #1619
- Make test checking for conversion to param by @rylev in #1620
- Do not emit cfg attribute if not requested by @riverar in #1623
- Add
DataProtection
sample by @kennykerr in #1624 - Expand
DataProtection
sample to illustrate buffer byte access by @kennykerr in #1626 - Basics of metadata generation by @kennykerr in #1633
- Simpler metadata discovery by @kennykerr in #1635
- Adopt Rust 2021 by @kennykerr in #1636
- Limit win32 array params to non-shared length params by @kennykerr in #1641
- Handle
IDispatch
edge case by @kennykerr in #1642 - Update Win32 metadata, regen crates by @riverar in #1646
- Type-specific handle validity checking by @kennykerr in #1648
- Avoids name collision in vtable generation by @kennykerr in #1649
- Use
BSTR
allocator asPCSTR
andPCWSTR
parameter allocator by @kennykerr in #1657 - Handle type mismatch with invalid handle values by @kennykerr in #1659
- Version 0.35.0 by @kennykerr in #1660
Full Changelog: 0.34.0...0.35.0
0.34.0
What's Changed
- Add support for Win32 array parameters by @kennykerr in #1562
- Add user consent verification sample by @kennykerr in #1566
- Anchor CI to Windows Server 2019 virtual image by @riverar in #1569
- Compact representation for pure
IDispatch
declarations by @kennykerr in #1568 - Fix
nightly
warning about unusedmust_use
by @kennykerr in #1580 - Expose Interface trait and Weak object in documentation by @vthib in #1576
- Improved Win32 array transformation by @kennykerr in #1570
- Avoid generating
IDispatch
members by @kennykerr in #1584 - Simplify common error code conversions by @kennykerr in #1585
- Remove nightly features that are no longer required by @kennykerr in #1591
- Provide hex output for
Debug
impl ofHRESULT
andNTSTATUS
by @kennykerr in #1590 - Fix multi arg COM methods and allow all types in interface methods by @rylev in #1594
- Allow for non-HRESULT return types in COM by @rylev in #1595
- Double quote feature names in generated docs for easier cut/paste by @riverar in #1599
- Basic component development support by @kennykerr in #1600
- Add license files to crate packages by @kennykerr in #1602
- Version 0.34.0 by @kennykerr in #1603
New Contributors
Full Changelog: 0.33.0...0.34.0
0.33.0
What's Changed
- Add first-class types for
PCSTR
andPCWSTR
by @kennykerr in #1550 - Prefer
&self
for COM interface traits by @kennykerr in #1511 - Only build the default doc target for
windows-sys
by @kennykerr in #1508 - Simplify implementing with WinRT generic interfaces by @kennykerr in #1510
- Update tests to use
UnsafeCell
by @kennykerr in #1517 - Correct
aarch64
import lib and add tests by @riverar in #1531 - Explicit parameter direction by @kennykerr in #1533
- Include Win32 "retval" signatures in transformation by @kennykerr in #1534
- Fix incorrect implementation shims by @kennykerr in #1535
- Experimental COM interface declaration support by @rylev in #1540
- Make
NTSTATUS::ok
aconst fn
by @roblabla in #1542 - Move feature and dependency tracking to the
metadata
crate by @kennykerr in #1544 - Constrain borrowed parameter lifetime by @kennykerr in #1545
- Simplify and add test for
Weak
by @kennykerr in #1548 - Avoid unnecessary
null_mut
in samples by @kennykerr in #1558 - Restore ability to codegen with windows as dep crate by @riverar in #1551
- Minor doc improvements by @kennykerr in #1564
Full Changelog: 0.32.0...0.33.0