Re:Rust vs C Pitfalls
by cderwin on Thursday December 29, 2016 @12:52AM
(#13275867)
Sure. It's not a fair comparison. But dynamically linking rust's std isn't an option. If you are optimizing for executable size, c wins because dynamically linking libc is possible. This is even true controlling for glibc, since most rust code also dynamically links glibc too (including hello world). In fact, rust's hello world has quite a few more shared dependencies than the equivalent c anyway: it uses libdl, librt, libpthread, and libgcc_s as well.
[ Parent
| on HN ]
Re:Rust vs C Pitfalls
by Manishearth on Thursday December 29, 2016 @01:32AM
(#13275999)
Dynamically linking to rust std (with a specially compiled libstd dylib) is an option iirc, just that nobody does it. Lack of stable ABI makes it less useful, but if you really need to do it there's nothing stopping you.
I suspect rust hello world using those libraries is due to a lack of LTO? Hello world doesn't need any of those.