Re:How small is the smallest .NET Hello World binary?
by ChrisSD on Sunday July 09, 2023 @11:52AM
(#36655527)
The ucrt is included as far back as Windows 7 (if you install updates).
Re:How small is the smallest .NET Hello World binary?
by kazinator on Sunday July 09, 2023 @12:17PM
(#36655773)
The increment in disk space usage caused by the update has to count toward the effective size of the hello program, experienced by the user of that installation.
Re:How small is the smallest .NET Hello World binary?
by ziml77 on Sunday July 09, 2023 @02:18PM
(#36657264)
For some reason, even with the UCRT, binaries seem overly bloated. I've been toying with Zig over the past couple weeks and I really like that it doesn't rely on a C runtime on Windows. Plus it makes it easy to operate entirely with UTF-16 strings, which is a nice to have when I'm writing a utility that is specific to Windows.
Re:How small is the smallest .NET Hello World binary?
by mananaysiempre on Sunday July 09, 2023 @03:09PM
(#36657817)
> C doesn't leverage the free run time of the OS, when that OS is Windows.
Stdio, no. Printf, no (unless you’re an adherent of LIBCTINY[1] or one of its descendants[2] and need only a minimal set of features). Malloc, yes—MSVC’s malloc() on Win32 has always been a thin wrapper around kernel32!HeapAlloc. Strlen or memcpy or whatnot—also possibly yes, but it’s not like minimal implementations of those are large anyway.
[1] http://bytepointer.com/resources/pietrek_libctiny_1996.htm
Windows has only recently been moving toward providing a public run-time for C; the "Universal C Run-Time" (UCRT) that has been introduced in Windows 10.