Hacker News new | past | comments | ask | show | jobs | submit login

  > Windows application don't need to bundle system libraries like the libc
That might be a bad example, because Windows applications are expected to bundle their own libc (MSVCRT). I'm not sure if modern Windows even ships with a copy -- it definitely doesn't ship with copies of all the versions that applications might depend on.

Linux follows the Windows model, where the stable interface is the kernel (Linux's syscalls, Windows's ntdll). This in turn implies that libc is a non-system runtime dependency, and a Linux application that wants to be portable across more than one release of Ubuntu (or whatever) should bundle its own copy.

Complaints of Linux ABI stability is mostly a story of old-timers trying to imitate how Unix worked in the '80s and '90s, with libc baked into the OS. Younger developers are more likely to use static linking or Docker/Flatpak/Snap.




> I'm not sure if modern Windows even ships with a copy -- it definitely doesn't ship with copies of all the versions that applications might depend on.

They actually did end up fixing this with Windows 10. https://learn.microsoft.com/en-us/cpp/windows/universal-crt-... I think what finally pushed them in that direction was wanting to be in control of security updates for libc.

> Linux follows the Windows model, where the stable interface is the kernel (Linux's syscalls, Windows's ntdll).

ntdll isn't stable. They remove entypoints with just about every major release.


Interesting! Is there a modern equivalent of kernel32, then?

I haven't done low-level Windows programming since before the 64-bit transition, but I thought they kept the model of a DLL wrapper with a stable ABI.


The modern version of kernel32/user32 is still kernel32/user32. That's the lowest point in the system exposing a mostly stable API.


>That might be a bad example, because Windows applications are expected to bundle their own libc (MSVCRT). I'm not sure if modern Windows even ships with a copy -- it definitely doesn't ship with copies of all the versions that applications might depend on.

It went the other way - Microsoft moved away from the "unstable C runtime" policy and introduced the Universal CRT (IIRC in 2015), officially being promoted to a Windows component, a guaranteed stable ABI, and shipped with Windows since W10.

>Linux follows the Windows model, where the stable interface is the kernel (Linux's syscalls, Windows's ntdll).

Ntdll is decidedly not guaranteed to be stable, and its direct use is explicitly discouraged by Microsoft. Win32 has always been the official and stable interface for NT-based OSes.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: