> We also changed the codebase from Rust to Go because of the Buildkit libraries.
Go is the best choice at the moment for such tools. These tools start a process, do lots of IO and exit.
Very pragmatic choice.
Go is the best choice at the moment for such tools. These tools start a process, do lots of IO and exit.
Very pragmatic choice.
Go can cross-compile from Linux to Windows, Darwin and FreeBSD without requiring any external tooling.
Meanwhile Rust requires a pile of variable quality community driven crates to do basic things.
And Go's runtime is built-in by default. Unlike Java so there's nothing to "carefully set".
In Go you run this to build:
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .
I do not actually know how you get this done in Rust (you do something with musl and a bunch of other stuff).This is not done by default to reduce binary sizes.