3 ms·
You miss the point go build and you get 1 portable tiny executable ngen, .net native, mono etc, you need more steps, and you get a folder with a bunch of
by Shadonototra 4y ago
You miss the point
go build
and you get 1 portable tiny executable
ngen, .net native, mono etc, you need more steps, and you get a folder with a bunch of files and folders
that's why these solutions didn't took off
- vips7L 4y agodotnet publish -p:PublishSingleFile=true
- pjc50 4y agoThis produces a self-unpacking executable that drops all the assemblies somewhere and then runs it. There can be surprising side effects. https://github.com/dotnet/runtime/issues/59715 https://github.com/dotnet/runtime/issues/59715 And check the small print on your platform as to whether it's really single file not requiring any other dependencies alongside it.
- vips7L 4y ago> This produces a self-unpacking executable that drops all the assemblies somewhere and then runs it. This no longer happens since .net 5.
- pjmlp 4y agoYou miss the point go build and you get 1 portable tiny executable, provided it is 100% Go code, without any dependency on cgo or OS APIs not packaged into the Go runtime. These solutions did take off, how do you think Unity games for PS, Xbox, Wii, Switch, Windows 10 UWP, and Xamarin apps for iOS/Android get delivered?
- eatonphil 4y agoUnless you have CGO_ENABLED=0 as well, `go build` will silently not build static binaries as soon as you depend on a package that uses cgo.