Visual Studio “14” Is Changing the C Runtime
Details continue to emerge from Microsoft as to how the support for standard C will be improved in Visual Studio “14”. Improving C99 compliance is a top priority, but complementing that effort is a redesign of the familiar
mscorlib DLL. Microsoft’s James McNellis announced that the company is splitting up Windows’ C runtime (CRT) into three distinct runtimes to better support the needs of the various platforms that applications are targeting.
The refactoring also improves the ability of Microsoft to maintain the existing runtime while making additions easier to implement. For example, McNellis notes that the CRT offers 142 variations of printf, and that until the refactor the supporting code was spread over hundreds of conditionally compiled regions.
- VCRuntime – Process startup, exception handling, stuff closely coupled to the compiler. Note that breaking changes may be made in the future.
- AppCRT – Functionality that is used on all platforms. Backward compatibility will be maintained.
- DesktopCRT – Desktop specific functionality, not bundled in on Windows Phones, etc. Backward compatibility will be maintained.
Visual Studio “14” has taken the first step in adopting the new layout by producing
desktop140.dll. Since the work to divide the runtime across these 3 files is still ongoing, all 3 are still required the CTP regardless of the application type being targeted. When the refactor is completed (prior to the official release of “14”), the version numbers will be removed from the filenames of AppCRT and DesktopCRT. At that time, Windows Store and Windows Phone apps will be able to utilize VCRuntime and AppCRT while desktop apps can also use DesktopCRT.
In the scenario of a future release of the runtimes, the newest version would take precedence and replace any older versions. So an app requiring the theoretical “VCRuntime16” would install the necessary runtime, and “VCRuntime14” would be replaced.
As the effort to split the runtime into these 3 parts continues, news as to the specifics of C99 have also been released by McNellis. Confusingly he writes that “14” has full C99 compliance—but that is tempered by the immediate qualifier that such compliance only applies if a given feature doesn’t require something unsupported by the Visual C++ compiler.
Yoni Goldberg Oct 30, 2014
Dmytro Svarytsevych Oct 30, 2014