Rust for Windows
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.
strlen
usage in metadata library with safe Rust by @Swatinem in https://github.com/microsoft/windows-rs/pull/1926
windows-sys
crate by @kennykerr in https://github.com/microsoft/windows-rs/pull/1935
implement
and interface
crates by @kennykerr in https://github.com/microsoft/windows-rs/pull/1931
rust-version
for windows-interface
crate by @kennykerr in https://github.com/microsoft/windows-rs/pull/1930
SetWindowLongPtrA
and GetWindowLongPtrA
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1932
&T
to *const T
for Win32 input parameters by @kennykerr in https://github.com/microsoft/windows-rs/pull/1939
windows::core
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1943
aarch64-pc-windows-gnullvm
and x86_64-pc-windows-gnullvm
targets by @mati865 in https://github.com/microsoft/windows-rs/pull/1883
Debug
for AgileReference
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1986
windows-sys
to 1.49 by @kennykerr in https://github.com/microsoft/windows-rs/pull/1987
no_std
support by @kennykerr in https://github.com/microsoft/windows-rs/pull/1992
windows::core
internals by @kennykerr in https://github.com/microsoft/windows-rs/pull/1993
bindgen
options by @kennykerr in https://github.com/microsoft/windows-rs/pull/1994
BOOL
, BOOLEAN
, and NTSTATUS
extensions rather than replacements by @kennykerr in https://github.com/microsoft/windows-rs/pull/1995
MAKEINTRESOURCE
style constants by @kennykerr in https://github.com/microsoft/windows-rs/pull/2007
BSTR
a core string type by @kennykerr in https://github.com/microsoft/windows-rs/pull/2006
unsafe
helpers to cast from C++ or raw IUnknown
pointers to Rust IUnknown
values by @kennykerr in https://github.com/microsoft/windows-rs/pull/2010
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.39.0...0.40.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.
Eq
and PartialEq
for NTSTATUS
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1869
derive
macros by @kennykerr in https://github.com/microsoft/windows-rs/pull/1870
tool_lib
crate to hold some of the common support for the windows-rs
tools by @kennykerr in https://github.com/microsoft/windows-rs/pull/1876
where
clauses in codegen by @rylev in https://github.com/microsoft/windows-rs/pull/1893
transmute
for binding primitive argument types by @kennykerr in https://github.com/microsoft/windows-rs/pull/1907
transmute
for direct return values where no translation occurs by @kennykerr in https://github.com/microsoft/windows-rs/pull/1911
transmute
for WinRT arrays by @kennykerr in https://github.com/microsoft/windows-rs/pull/1914
Display
impl for HSTRING
is infallible by @kennykerr in https://github.com/microsoft/windows-rs/pull/1915
Decode
helper in a few more places by @kennykerr in https://github.com/microsoft/windows-rs/pull/1918
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.38.0...0.39.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.
RawPtr
type alias by @kennykerr in https://github.com/microsoft/windows-rs/pull/1791
Reader
to Tree
construction by @kennykerr in https://github.com/microsoft/windows-rs/pull/1797
flatten
comment by @kennykerr in https://github.com/microsoft/windows-rs/pull/1801
Type
methods simpler to use by @kennykerr in https://github.com/microsoft/windows-rs/pull/1806
windows::core::Error
to std::io::Error
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1809
Borrowed<'a, T>
RFC by @rylev in https://github.com/microsoft/windows-rs/pull/1788
Cfg
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1812
FactoryCache
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1829
windows
crate by @kennykerr in https://github.com/microsoft/windows-rs/pull/1836
cfg
dependencies for types with generic interface type dependencies by @kennykerr in https://github.com/microsoft/windows-rs/pull/1832
component
helper function to simplify component development by @kennykerr in https://github.com/microsoft/windows-rs/pull/1840
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.37.0...0.38.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.
IntoParam
by @AronParker in https://github.com/microsoft/windows-rs/pull/1713
compose
offset in implement
macro by @kennykerr in https://github.com/microsoft/windows-rs/pull/1724
IUnknown
Unsafe Annotations by @rylev in https://github.com/microsoft/windows-rs/pull/1734
Interface
trait by @rylev in https://github.com/microsoft/windows-rs/pull/1738
HSTRING
compatibility testing by @kennykerr in https://github.com/microsoft/windows-rs/pull/1749
core::ptr::write
for out params by @rylev in https://github.com/microsoft/windows-rs/pull/1750
ToImpl
by @rylev in https://github.com/microsoft/windows-rs/pull/1748
HSTRING::clear
into the Drop
impl by @rylev in https://github.com/microsoft/windows-rs/pull/1752
cast
method produced by implement
macro unsafe by @rylev in https://github.com/microsoft/windows-rs/pull/1753
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.36.1...0.37.0
This is a minor service release to work around docs.rs limitations in order to publish windows-sys
docs.
no_std
by @ChrisDenton in https://github.com/microsoft/windows-rs/pull/1722
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.36.0...0.36.1
SetLastError
when allocating string params by @kennykerr in https://github.com/microsoft/windows-rs/pull/1665
heap_string
function by @rylev in https://github.com/microsoft/windows-rs/pull/1667
IActivationFactory
definition with tailored definition by @kennykerr in https://github.com/microsoft/windows-rs/pull/1678
HSTRING
and OsStr
/OsString
by @kaivol in https://github.com/microsoft/windows-rs/pull/1693
Matrix3x2::identity()
and Matrix3x2::translation(f32, f32)
const by @TheOddGarlic in https://github.com/microsoft/windows-rs/pull/1695
Event<T>
type that can be used to implement a WinRT event by @kennykerr in https://github.com/microsoft/windows-rs/pull/1705
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.35.0...0.36.0
interface
feature could not be used without the implement
feature by @rylev in https://github.com/microsoft/windows-rs/pull/1612
DataProtection
sample by @kennykerr in https://github.com/microsoft/windows-rs/pull/1624
DataProtection
sample to illustrate buffer byte access by @kennykerr in https://github.com/microsoft/windows-rs/pull/1626
IDispatch
edge case by @kennykerr in https://github.com/microsoft/windows-rs/pull/1642
BSTR
allocator as PCSTR
and PCWSTR
parameter allocator by @kennykerr in https://github.com/microsoft/windows-rs/pull/1657
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.34.0...0.35.0
IDispatch
declarations by @kennykerr in https://github.com/microsoft/windows-rs/pull/1568
nightly
warning about unused must_use
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1580
IDispatch
members by @kennykerr in https://github.com/microsoft/windows-rs/pull/1584
Debug
impl of HRESULT
and NTSTATUS
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1590
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.33.0...0.34.0
PCSTR
and PCWSTR
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1550
&self
for COM interface traits by @kennykerr in https://github.com/microsoft/windows-rs/pull/1511
windows-sys
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1508
UnsafeCell
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1517
aarch64
import lib and add tests by @riverar in https://github.com/microsoft/windows-rs/pull/1531
NTSTATUS::ok
a const fn
by @roblabla in https://github.com/microsoft/windows-rs/pull/1542
metadata
crate by @kennykerr in https://github.com/microsoft/windows-rs/pull/1544
Weak
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1548
null_mut
in samples by @kennykerr in https://github.com/microsoft/windows-rs/pull/1558
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.32.0...0.33.0
PartialEq
and Eq
for scoped enums to support constant patterns by @kennykerr in https://github.com/microsoft/windows-rs/pull/1438
implement
macro by @kennykerr in https://github.com/microsoft/windows-rs/pull/1450
Send
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1458
const
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1468
const
by @kennykerr in https://github.com/microsoft/windows-rs/pull/1470
Debug
traits by @kennykerr in https://github.com/microsoft/windows-rs/pull/1473
windows-implement
crate refactor by @kennykerr in https://github.com/microsoft/windows-rs/pull/1489
Full Changelog: https://github.com/microsoft/windows-rs/compare/0.30.0...0.32.0