What is Go written in?

Go is self-hosting since version 1.5 (2015). The Go compiler and runtime are written in Go itself. Before Go 1.5, the gc compiler was written in C. The transition to a self-hosted compiler was completed as part of the Go 1.5 release.

Quick Facts

Short answer
Go compiler and runtime are written in Go
Self-hosting since
Go 1.5 in 2015
Before Go 1.5
Compiler written in C
Low-level pieces
Some assembly remains

Details

The Go compiler toolchain is written in Go. The Go runtime, including the scheduler and garbage collector, is also mostly written in Go, with assembly where the runtime needs architecture-specific machine-level behavior.

Before Go 1.5, the compiler was written in C. Go 1.5 completed the move to a self-hosted compiler, which means modern Go is built using Go itself.

Go implementation layers

LayerWritten inRole
Modern compilerGoCompiles Go source; self-hosted since Go 1.5
Historical compilerCUsed before the Go 1.5 rewrite
RuntimeGo and assemblyGoroutines, scheduler, garbage collector, low-level runtime support

The dataset records Go's self-hosted compiler and runtime relationships as well as the historical compiler relationship from C.

Explore in the Graph

See implementation and influence relationships interactively.

Open Interactive Graph →

Related Pages