News for hackers. Stuff that matters.
Re:I love building a startup in Rust. I wouldn't pick it again by schemescape on Friday February 17, 2023 @05:14PM (#34841327)
Yes, "dotnet publish" is what I was thinking of. Wow, I didn't realize it could cross-compile!

I can't quite tell from the .NET SDK repository -- any idea if this stuff works on Linux (i.e. building on Linux, perhaps for Windows)? I see mention of MSBuild, so I'm guessing maybe not.

I love C#, but I abandoned it a while ago because I wanted to only rely on open source tools (just to ensure my code is usable in the future). Then, of course, they open-sourced a bunch of stuff (including the compiler). If I at least had the option to develop C# on Linux (with support for cross-compiling to Windows), that would be great (and honestly something I would have never expected 10 years ago).

Re:I love building a startup in Rust. I wouldn't pick it again by schemescape on Friday February 17, 2023 @11:52PM (#34844011)
Actually, it does work from Linux! I just tried it and "dotnet publish --os win" cross-compiled from Linux to Windows. Nice!
Re:I love building a startup in Rust. I wouldn't pick it again by kcartlidge on Saturday February 18, 2023 @02:57AM (#34844949)
> Actually, it does work from Linux ... cross-compiled from Linux to Windows.

Here's a link to the commands I use to generate my cross-platform builds [1]. They are easy enough to stick in a shell script or batch file so you get all the builds with one command. These produce single executables, trimmed for size.

[1] https://github.com/kcartlidge/Newt#generating-stand-alone-bu...