Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ...
by camus2 on Sunday October 22, 2017 @09:42PM
(#15530096)
Go runtime is included in the executable. C or C++ do not automatically do that when writing a simple "hello world" and compiling it into an executable. stdio isn't statically linked by default.
And when rid of debugging symbols, even when importing the fmt package :
package main
import "fmt"
func main() {
fmt.Print("Hello World")
}
And when rid of debugging symbols, even when importing the fmt package :
go build -ldflags "-s -w" hello.gois 1.3MB .