[Proposal] Switch to the Universal CRT on Windows.

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Jul 3 05:18:38 UTC 2026


On 03/07/2026 5:14 PM, Adam Wilson wrote:
> On Wednesday, 1 July 2026 at 12:37:22 UTC, Dennis wrote:
>> 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.
> 
> There is a technical argument for leaving `libc` behind as well. 
> Specifically if you want to do anything with async operations you're 
> going to have to use the API's specific to that platform. For example: 
> Linux has `io_uring` where Windows has I/O Completion Ports.
> 
> `libc` stops working as a universal system interface when you need to do 
> async work, which means that anywhere we might want to support an async 
> interface, we'll need to use something other than `libc`.
> 
> Another example is terminal colors. Windows has 
> `SetConsoleTextAttribute()` where `libc` is the only choice on Linux. 
> Which means we really should be abstracting away `libc`.
> 
> IMO, BaseD is going to become that abstraction.

This is sounding far too platform specific, and will make it so it 
cannot be the base most library for D.

This is what druntime is for.



More information about the Digitalmars-d mailing list