[Proposal] Switch to the Universal CRT on Windows.

Dennis dkorpel at gmail.com
Wed Jul 1 12:37:22 UTC 2026


On Wednesday, 1 July 2026 at 01:24:05 UTC, Adam Wilson wrote:
> The solution is pretty straight-forward. Use the Universal CRT 
> for everything on Windows.

I'm in favor, but can I say that this shows how much of a 
nuisance depending on libc is? Walter often says how printf is 
the most debugged function ever so we should leverage that in 
dmd, but here we are getting bitten by libc nonsense yet again. 
Between that, its [unsafe 
interface](https://github.com/dlang/dmd/pull/13987), stupid 
[global locale 
system](https://github.com/dlang/dmd/blob/cfae207a4dfa38bdc67b28986e263365adc577c3/compiler/src/dmd/root/port.d#L93-L104) and [random breakages](https://bugzilla-archive.dlang.org/bugs/23846/), are we really better off than if we just wrote our own D function to interpolate numbers in strings?

In my own code I avoid libc as much as I can, using `CreateFileW` 
instead of `fopen` for example. Only a few essentials like memcpy 
and memset remain since LDC sometimes emits calls to that even 
when you don't write them yourself. At least those are simple and 
deterministic: I haven't found a libc yet that implements them 
visibly different than the rest.


More information about the Digitalmars-d mailing list