Live data from Hacker News

Cross-compiling binaries for Windows is easier than building natively

gist.github.com

131–140 of 349 posts

Re: Cross-compiling binaries for Windows is easier than building natively

#131

Earlier quoted context omitted.

That's exactly it. Windows developers know NTFS has Symbolic Links https://docs.microsoft.com/en-us/windows/win32/fileio/creati...

What's the standard for being an "actual Windows user"? Asking because I doubt e.g. my mom knows that NTFS has symlinks.

Egads, if the parent post wasn't edited, then I misread it. Sorry about the confusion.

Re: Cross-compiling binaries for Windows is easier than building natively

#132
post #80
post #53

Earlier quoted context omitted.

I suspect if you restrict it to developers the numbers would look very, very different on the stackoverflow survey windows is 41.2%: https://insights.stackoverflow.com/survey/2021#most-popular-...

If you toggle that response to "All Respondents" instead of "Professional Developers" Windows goes up to 45%. Plus, 3% of users are using windows subsystem for Linux. So 48%. Whereas Mac and Linux are both at 25%. Even for developers, Windows is still the clear majority.

it's very interesting to see Windows at less than 50%

20 years ago that would have been 95%+

and its market share for developers is way, way, way less than its share on desktop (which was my point)

Re: Cross-compiling binaries for Windows is easier than building natively

#133
post #14

It is. I generate the Windows executables for a program by cross-compiling Rust on Linux. Then test with Wine. The Rust crates are cross-platform enough that I don't have to special case platforms. This is easier than having a Windows machine. The only current headache is that there's no pure Rust bundler, to make ".msi" or ".msix" installer files. If you dump the legacy OS stuff, it gets easier.

> Then test with Wine. I tried doing that, and then found that my test suite passes on real Windows but fails on Wine, because it uses APIs which Wine doesn't implement correctly (or at all).

Which APIs are those? A bug filed at https://bugs.winehq.org/ might get some attention.

Re: Cross-compiling binaries for Windows is easier than building natively

#134

Only if you want to be trendchasing rather than letting backwards compatibility take care of itself... I'm a native Win32 developer, have been one for a few decades, and know quite a few others still using MSVC6 because it's fast and enough for what they do. Takes Long file paths: Azure, OpenSearch, and ~90 other open source projects have to document how to enable long file paths on Windows because the default is a ~…

> I'm a native Win32 developer, have been one for a few decades, and know quite a few others still using MSVC6

Doesn't that tie you to a really old C runtime, and aren't security holes often found in the C runtime?

Re: Cross-compiling binaries for Windows is easier than building natively

#137
post #103

Earlier quoted context omitted.

Use ‘zig cc’ and target the appropriate glibc.

I was sad to find out "Zig supports only the last three macOS versions". No ncdu2 for me :( https://github.com/ziglang/zig/pull/10232#issue-1064864004

Apple only supports the last three macOS versions too, so if you're on an older one than that you are not getting security vulnerability patches.

Re: Cross-compiling binaries for Windows is easier than building natively

#138
post #78

Earlier quoted context omitted.

Oh, you and the article's author are either forgiven or seeing the best in people. Me, on the other hand, who lived the Microsoft with their shady dealings in Bill's / Ballmer's era, I remember their crushing on OEM's to not allow even a shred of openness in their systems. Only because of shifting in developer's in favor of Apple's / Google's Microsoft changed the tune with "Microsoft loves Linux". Bleah! I have no l…

Microsoft always had great developer tech. And having access to that tech more freely (as in on other platforms, partially open source etc) is a significant plus for me. I loved .net back in 2003 or whatever. Then I never got to use it for years because I was on unix land. It is now open source and multi platform. They attacked open anything with all their might (and they were fucking mighty) and the enemy still flou…

> Microsoft always had great developer tech.

when, exactly?

in the 90s-2000s they were always a poor imitation of Borland's

and from the 2010s to today JetBrain's tools blow them out of the water

Re: Cross-compiling binaries for Windows is easier than building natively

#139

>I'm still blown away that they literally made the .NET team revert the dotnet watch PR at the last minute, so that they could sell it as a feature. This is not even true. Due to limited resources they wanted to cut scope of what the .NET 6 update included and they thought that it would be okay to delay the dotnet watch feature because most people would still have hot reloading from using Visual Studio. The PR for br…

> This is not even true.

It is absolutely true. The CLI-first `dotnet watch` was pretty much done (I was using it in preview for months beforehand), and it was cut to promote hot reload as a Visual Studio feature.

Source: I'm the person who raised the initial GitHub issue about the dotnet watch change, and I talked to multiple Developer Division employees off the record. It was a deeply unpopular move that came from the top (Julia Liuson).

Re: Cross-compiling binaries for Windows is easier than building natively

#140
post #94
post #51

Earlier quoted context omitted.

> The only current headache is that there's no pure Rust bundler, to make ".msi" or ".msix" installer files. I have set up a toolchain based on Wix, running via Mono and Wine on Linux, for the purpose of packaging some rather complex .msi files in a commercial software project. Has been running on the Linux-based CI servers of that project for 10 years straight now, with the only change having been that the entire ch…

WiX is great. I have been using it for over a decade to package an internal application. It's all driven by a simple text file which I liked over Microsoft's packaging offerings.

It's another example where the free tools are better than Microsoft's.
Post reply on HN