3 ms·
Why having paths in a production binary? I mean, for debug binary kind of makes sense, but for production doesn't make any sense at all. As I understand even st
by alerighi 6y ago
Why having paths in a production binary? I mean, for debug binary kind of makes sense, but for production doesn't make any sense at all. As I understand even stripping the binary doesn't solve the issue.
This is not only a privacy concern but also a concern on efficiency to me. Sure on a desktop application, who cares, but since Rust is targeted also for embedded development, on a firmware where you have a few kB of flash memory wasting space for strings like paths on your system doesn't make a lot of sense.
- steveklabnik 6y agoSo there's a few different things here, but the original bug was about paths from the Rust CI machines. That is, while almost all Rust code is compiled on users' machines, the standard library is a bit different; it's distributed pre-compiled, and so it's built in release mode, but with debug info on. So the paths that existed weren't ever user paths, but the ones from our CI. In embedded you can use various options to reduce binary size, including the ones that get rid of these paths. I commented on this a few days ago over on reddit: https://www.reddit.com/r/rust/comments/m0irjk/opinions_on_rust_for_hardrealtimesystems/gq9hrj7/?context=3 https://www.reddit.com/r/rust/comments/m0irjk/opinions_on_ru...