skip to content
Alvin Lucillo

Go's self-contained and statically linked binary

/ 1 min read

💻 Tech

One thing I learned about Go recently is that the compiled Go program using go build already has the Go runtime, which means that the garbage collector, scheduler, and interface system are also included in the binary. This is larger than the binaries of some programming languages; however, Go’s compiled binary is already self-contained and statically linked, meaning it doesn’t need a runtime environment to run. For example, languages like Java and Node.js require JVM and Node.js runtime respectively. You can build the same Go code into different platforms, and it will run just fine.