Re:Show HN: Tiny 1k Rust binary on Windows
by ChrisSD on Tuesday December 01, 2020 @03:31PM
(#25269504)
Ok, I've just tried that but I also needed to add `/force` otherwise it complained about missing symbols. So the full compile line is:
cl small2.c /link /force /nodefaultlib /entry:_start /subsystem:CONSOLE kernel32.lib
This gets it down to 3kb.
https://docs.microsoft.com/en-us/cpp/build/reference/nodefau...