github microsoft/windows-rs 101

one day ago

All crates now share the same version. This release brings simpler binding generation, new text and picker APIs, and fixes across COM ownership and the UI crates.

windows and windows-sys retain the previous metadata baseline; the newer header-generated metadata ships in windows-default. Both umbrella crates now require Rust 1.85.

Core and runtime

Crate What's new
windows Updated COM/WinRT generation and shared DateTime, TimeSpan, and IReference types. VARIANT and PROPVARIANT no longer clear themselves on drop.
windows-sys Regenerated raw bindings with updated linking support and Rust 2024.
windows-core Adds init_sta, create_instance, and borrowed as_interface conversions. Fixes COM, array, and downcast ownership. Weak is no longer Send or Sync.
windows-result Adds const HRESULT::from_components. Error now implements the standard error trait without requiring std.
windows-strings Adds an explicit null-terminated HSTRING::as_ptr and fixes string allocation and pointer handling.
windows-collections Adds read-only IInspectable vectors and improves snapshot and storage handling. Rust-backed collections now require stored values to be Send + Sync.
windows-future Fixes completion-handler ownership, waker handling, and error propagation. Operations created with ready or spawn now transfer successful results once rather than cloning them.
windows-reference Uses generated IReference bindings. Boxing Rust values now requires Send + Sync.
windows-numerics Adds the edge-based Rect type shared by Canvas and Text.
windows-time TimeRangeError now implements the standard error trait without requiring std.
windows-threading Adds priority-based submission and delayed tasks through submit_after.
windows-link Adds DLL imports by ordinal.
windows-implement Supports enum implementations and fixes generated-name collisions. COM implementations now require 'static + Send + Sync.
windows-interface Fixes scoped-interface pointer handling and inherited interface conversions.
windows-registry Updated native bindings and dependencies; no major public API changes.
windows-services Updated native bindings and dependencies; no major public API changes.
windows-version Updated bindings and documentation; no new public APIs.

Binding and metadata tools

Crate What's new
windows-bindgen One filtering model for namespaces, types, and members. Defaults to flat, minimal bindings in OUT_DIR; use .full() for higher-level wrappers. Better filter diagnostics and fixes for dependencies, native layouts, parameters, and output ownership.
windows-clang Reworked header capture around compiler queries for types, layouts, calling conventions, constants, and annotations, with reconciliation across x86, x64, and ARM64.
windows-clang-sys First functional release: raw Clang bindings and the native semantic-query companion. Requires a matched libclang.dll and windows_clang.dll pair.
windows-default Updated bundled metadata, including additional SDK declarations and corrected native contracts.
windows-metadata Adds container and blob validation, improves pointer and attribute handling, and makes the writer optional through a feature.
windows-rdl Expands support for nested records, inline function pointers, mixed pointer constness, explicit layouts, ordinal imports, and WinRT class contracts.
cppwinrt Version and documentation refresh; no functional changes.

UI and graphics

Crate What's new
windows-animation Uses the shared COM activation helper; the public animation API is largely unchanged.
windows-canvas Text types move to windows-text. Adds redraw invalidation and successful-submission callbacks, improves interop, and preserves native drawing errors before presenting.
windows-composition Adds rounded rectangles, batch-completion callbacks, surface stretching, and drawing-surface support for Reactor. Color is renamed to CompositionColor.
windows-pickers First functional release: file-open, folder, and save dialogs, with standalone HWND and Reactor integration.
windows-reactor More control properties, scroll requests and observations, notification icons, and fixes for keyed lists, controlled input, event delivery, and teardown. Targets Windows App Runtime 2.6.4 and removes the old imperative app API. Still a preview.
windows-reactor-setup Updated runtime deployment, including fixes for custom Cargo profiles.
windows-text First functional release: DirectWrite fonts, rich and vertical text layout, measurement, hit testing, glyph runs, and rasterization. Text positions use UTF-8 byte offsets.
windows-webview Callback-driven window and HWND hosting, scoped event registrations, and revised callback lifetime handling.
windows-window Adds client-area sizing, move and close callbacks, hidden windows, and control over whether closing a window exits the message loop. Improves handle lifetime tracking.

What's Changed

Full Changelog: 74...101

Don't miss a new windows-rs release

NewReleases is sending notifications on new releases.