I would be surprised if the UTF-8 support in Windows was anything deeper than the A functions creating a W string and calling W functions, which is what Rust is doing already.
Re:Glibc Buffer Overflow in Iconv
by tialaramex on Sunday April 21, 2024 @08:26PM
(#40110444)
The question is whether that's all they ever do, or whether gradually some parts of Windows begin to decide to be UTF-8 first and their W functions now translate the opposite way. This must be tempting for some networking stuff, where you're otherwise taking a perf hit compared to Linux.
That said, even now in 2024, it's not clear how much of a bet Windows is making on UTF-8 versus UTF-16.