30 points sumnole 5 hours ago 7 comments
andsoitis 5 hours ago | parent
weinzierl 46 minutes ago | parent
Since WASM ships with a garbage collector that C# can use while Rust does all the memory management itself, of course it will be bigger.
EDIT: Reading OP more thoroughly I think I'm wrong. Apparently in the compared versions, the C# version ships a runtime with garbage collector.
afdbcreid 42 minutes ago | parent
The comparison is unfair for other reasons (the C# runtime was optimized for WASM size and the Rust not, it's possible to be much smaller in Rust), but it's still cool.
xnorswap 31 minutes ago | parent
What matters more for comparing what you get out of languages is the output of idiomatic code written against typical frameworks.
Indeed, it's still cool to see, even if it's optimised to beyond recognition, as seeing the occasional C# win is nice to keep the "re-write in rust" wolves from the door, who seem to ever lurk, especially in a world where re-writes appear easier.
afdbcreid 19 minutes ago | parent
Not everything, no. You can't run C# without the .NET runtime. Some parts of it are irreplaceable.
And the Rust optimizations to shrink binary size (see https://github.com/johnthagen/min-sized-rust) are commonly done in production when it matters, not just in WASM but also in embedded.
sondr3 29 minutes ago | parent
[1]: https://www.reddit.com/r/dotnet/comments/1x7wsgb/rust_just_l...
xxs 18 minutes ago | parent
And then the personal writing the code has to be an expert in all languages involved to make it even half fair, instead of just a sound-bite/click-bait.