4 ms·
dotnet publish -o . -p:PublishAot=true :) To be fair, I do not think the author understands what static binaries are and why they may or may not want them, and
by neonsunset 2y ago
dotnet publish -o . -p:PublishAot=true :)
To be fair, I do not think the author understands what static binaries are and why they may or may not want them, and how what Go does differs to what C/C++ toolchain does. I’d be very surprised if they do, being a Go developer. Next time they will learn another excuse to promote their language.
- deleted 2y ago[deleted]
- Zambyte 2y agoAlso to be fair, they did say "by default", and those options you provided must be set because they are not default.
- deleted 2y ago[deleted]
- lynndotpy 2y agoFor starters, I develop C# professionally, and I use Go almost exclusively as a consumer :) Your assumptions about me are wrong, and static compilation is not a complicated idea. Go or Rust programs are standalone by default. You just download the binary, `chmod +x` it, and drop it in your $PATH. Caddy, Helix, Micro, ripgrep, fd-find, eza, bat, and bottom are all programs I install that way. Some C/C++ applications release as standalone binaries, but that's not the default. and I have not encountered a single C#/.NET application that distributes as a standalone binary. The only difficulty is if you're on non-libc distros like Alpine (which uses musl) or an uncommon OS-architecture combo like Arm64 Windows or RISC-V anything. These are usually rare and intentional choices and you would be used to building from source. A nice thing is that it's usually much easier to compile Rust or Go projects from source than it is for C/C++.