Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

"Windows 10 it ships with Universal C Runtime", really? Is this a different thing than vc_redist?

Games still require vc_redist.x86.exe or vc_redist.x64.exe to be installed, even on Windows 10. Ancient games also require ancient versions of these to be installed.

I have always found it very strange that these wasnt just included in Windows.



There are two "components" to what used to be `msvcrt.lib`:

- The C runtime library (now `ucrt.lib` AKA the universal C runtime) - The compiler runtime (now `vcruntime.lib`)

The former has a stable API, but the latter doesn't - it changes from one compiler version to the next, as it is used to support various C++ language features.

When these two were combined as `msvcrt.lib`, there was no way for windows to ship it with the OS, because it changed with each VC++ version - they could have shipped historical versions, but it wouldn't really help developers who can't guarantee that the the OS version used by their users is newer than their version of VC++.

Now that these two are split, microsoft can ship the stable universal C runtime with the OS, and programs that only rely on the C runtime do not need a redistributable at all. (This makes things easier for other languages like Rust, or things compiled from GCC, which don't need the VC++ runtime).

Programs that use the VC++ runtime still need to ship the corresponding `vcruntime`, although you still have plenty of freedom in how you do that (eg. bundle DLLs, statically link, etc.) and the compiler runtime itself is smaller than the whole C runtime library.


Great explanation, thanks!




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

Search: