Hacker News new | past | comments | ask | show | jobs | submit login

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.




The 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.)


> 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.


As 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...


It’s not hard to cross compile for windows with mingw. As long as you’re not using something like gtk.


It'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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: