Skip to content

Instantly share code, notes, and snippets.

View kennykerr's full-sized avatar

Kenny Kerr kennykerr

View GitHub Profile

Rust on Windows wishlist

Rust developers on Windows encounter build-performance and reliability problems, along with gaps in Cargo's support for native Windows binaries. These issues extend beyond windows-rs and affect Rust development across the Windows ecosystem.

1. Build performance

Make LLD a supported linker for Windows MSVC targets

Rust still defaults to link.exe for Windows MSVC targets, while Rust ships LLD and uses it by default on some other targets. The long-running proposal to make Rust's LLD linker the default on x64 Windows MSVC remains open because compatibility gaps still need to be resolved.

@kennykerr
kennykerr / reactor-performance.md
Last active November 11, 2026 17:17
A few Reactor performance numbers

A few Reactor performance numbers

C# and Rust

Same 4,900-cell grid, same window size, same WinAppSDK 2.6.4 runtime. Both release x64; C# is NativeAOT, not JIT. We removed the live diagnostic labels from both, keeping the instrumentation.

Metric One cell: C# One cell: Rust 50% updates: C# 50% updates: Rust
Updates/sec 18.46 21.05 5.14 6.76

Libclang gaps behind windows-clang-sys

The problem is not that Clang cannot parse these headers. Its C++ AST contains facts that stock libclang's C API does not expose precisely enough. We need those facts to compare declarations and emit correct metadata, or to reject unsupported semantics instead of silently losing them.

This inventory is verified against our pinned LLVM 22.1.8 and ClangSharp commit 0c1c4098a7aab7cb392a2367b75d447bbac05d58. Check upstream main before implementing additions.

What the two extra layers do

@kennykerr
kennykerr / winui-wishlist-gist.md
Last active October 15, 2026 22:40
WinUI wishlist for declarative UI frameworks

WinUI wishlist for declarative UI frameworks

1. Transactional and batched WinUI updates

Issue: [microsoft/microsoft-ui-xaml#11968][11968]

Let a framework stage property, content, collection, removal, and reparenting operations on a XamlRoot, then commit them atomically.

  • Layout, bindings, lifecycle work, and events must see only committed state.

WinUI wishlist for declarative UI frameworks

Validated against the current C# Reactor and windows-reactor implementations.

Design requirement: a coarse-grained ABI

These features should add only one begin call and one commit or abort call per root update. Normal property and collection operations should join the active update automatically, and event handlers should be able to read its origin without casting or querying the sender. Avoid token-bearing overloads or transaction calls for every property.

WinUI wishlist for windows-reactor

  • Transactional property and tree updates - biggest architectural win. Add an update session on a XamlRoot that stages property and child-tree changes, validates them, then makes them visible together. Layout and public notifications should only see the final state. Operations that cannot be staged, such as showing a dialog or initializing a WebView, can stay outside the transaction. This would prevent partial updates from leaving Reactor and WinUI out of sync and remove much of the defensive ordering and event suppression around updates.

  • Publish the XAML behavior WinUI already knows - biggest code-generation win. Include metadata

Coleman GK200 Gas vs. TrailMaster MID XRX-R

Feature Coleman GK200 Gas TrailMaster MID XRX-R Winner / Notes
Engine 196cc, ~6-9 HP (single-cylinder, air-cooled) 196-212cc, ~6.5-7 HP (OHV, air-cooled) Similar power; TrailMaster often feels more refined
Top Speed 18-23+ MPH 24-31+ MPH TrailMaster (higher potential)
Transmission Automatic chain-drive with F/N/R Torque converter automatic with F/N/R TrailMaster (smoother CVT-style)
Suspension Independent front shocks, rear mono shock Upgraded independent front + rear (full suspension) TrailMaster (better on rough farm terrain)
**Br
### Coleman GK200 Gas vs. TrailMaster MID XRX-R
| Feature | Coleman GK200 Gas | TrailMaster MID XRX-R | Winner / Notes |
|-----------------------------|--------------------------------------------|------------------------------------------------|---------------|
| **Engine** | 196cc, ~6-9 HP (single-cylinder, air-cooled) | 196-212cc, ~6.5-7 HP (OHV, air-cooled) | Similar power; TrailMaster often feels more refined |
| **Top Speed** | 18-23+ MPH | 24-31+ MPH | **TrailMaster** (higher potential) |
| **Transmission** | Automatic chain-drive with F/N/R | Torque converter automatic with F/N/R | **TrailMaster** (smoother CVT-style) |
| **Suspension** | Independent front shocks, rear mono shock | Upgraded independent front + rear (full suspension) | **TrailMaster** (better on rough farm terrain) |
| **Br
Feature,Coleman GK200 Gas,TrailMaster MID XRX-R,Winner / Notes
Engine,"196cc, ~6-9 HP (single-cylinder, air-cooled)","196-212cc, ~6.5-7 HP (OHV, air-cooled)",Similar power; TrailMaster often feels more refined
Top Speed,18-23+ MPH,24-31+ MPH,TrailMaster (higher potential)
Transmission,Automatic chain-drive with F/N/R,Torque converter automatic with F/N/R,TrailMaster (smoother CVT-style)
Suspension,"Independent front shocks, rear mono shock",Upgraded independent front + rear (full suspension),TrailMaster (better on rough farm terrain)
Brakes,Rear disc (some listings all-wheel),Hydraulic rear disc,TrailMaster (more consistent)
Dimensions (L x W x H),"~67"" x 44"" x 47""","~67"" x 43"" x 51""",Very similar size
Wheelbase,"~49-50""","~50"" (comparable)",Tie
Ground Clearance,"~3.1-3.2""","~3-4""+ (better setup)",TrailMaster
Dry Weight,~290 lbs,~330 lbs,Coleman (lighter)
@kennykerr
kennykerr / faithful-metadata-report.md
Last active July 15, 2026 22:30
Report: Faithful in-house metadata vs. win32metadata (windows-rs)

Report: Faithful in-house metadata vs. win32metadata

Recommendation: Adopt the faithful, header-derived approach (windows-rs windows-clang pipeline, PR #4649) as the metadata source of truth for the Rust projection. The evidence below supports this decisively for the windows-rs use case.

The two approaches

win32metadata (microsoft/win32metadata)