3 ms·
One of the more attractive things about Rust for me is that I can easily write portable code. I distribute Windows binaries for a certain Rust project and they'
by edflsafoiewq 6y ago
One of the more attractive things about Rust for me is that I can easily write portable code. I distribute Windows binaries for a certain Rust project and they've kept working despite the fact I haven't tested on Windows in years.
I'm not sure I would even know how to build any of my C/C++ projects on Windows.
- pansa2 6y ago> they've kept working despite the fact I haven't tested on Windows in years. How do you know? :) Cross-compilation, avoiding the need to build on many different systems, is great - but I’d still want to test on all those systems.
- steveklabnik 6y agoAs a Windows user, I see the other side of this, and it is usually true. It is easy to run in CI, maybe that’s part of it. I’m not sure exactly how it’s the case, but I’ve been thinking about it a lot lately; I had a convo on HN last week about this...
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- swiley 6y agoIt’s not hard to cross compile for windows with mingw. As long as you’re not using something like gtk.
- edflsafoiewq 6y agoIt's not just building, it's also stuff like path handling (think of the wrapper everyone writes around _wfopen), argv expansion, etc. Also the face that I could compile it on Linux doesn't help me document how people on Windows are supposed to compile it.
- megameter 6y agoThe most important layer in dependency management, I've found, is always in the systems code and what resources it consumes. If you get a handle on that, the rest is addressed with a well-targeted interface to the systems code, which the application uses uniformly. This interface can even take the form of a transpiled language. And to the degree that Rust is effective, it lets a greater portion of the systems code be managed by a common interface. It remains as painful as most when it comes to binding external C code. (I do think Zig is really promising in this regard by aiming to absorb C more comprehensively.)