I was pleased to find that the Rust install on Windows was pretty seamless, apart from the unsigned installer, but what interests me is how the generated binaries compare.
I compared a simple C hello world, using the Microsft toolset, against the equivalent Rust program.
My compile/link used nothing but defaults, the command line for rust, “rustc hello.rs”, for C, “cl helloc.c”
On windows, a simple hello world seems a tad bloated at 3036103 bytes vs a native C hello world at 73216 bytes. A factor of 41, yikes!
The pain only starts there, as DLLs are not included in the exe itself. I dug a bit deeper with dumpbin. Let’s look at the C imports… a bunch of functions from just one DLL, kernel32.exe, not too shabby, now for Rust., it needs kernel.dll too, but then it also demands the following…
Rust the langauge I like, Rust the implementation, less so.