3 ms·
None of them generate true freestanding executables by default. Both Go and Rust require glibc. And Go's runtime is built-in by default. Unlike Java so there's
by hu3 1y ago
None of them generate true freestanding executables by default. Both Go and Rust require glibc.
And Go's runtime is built-in by default. Unlike Java so there's nothing to "carefully set".
- bigyabai 1y agoBy that definition, I cannot name a single high-level programming language that generates freestanding binaries.
- hu3 1y agoMany of them can, including Rust and Go. Just not with default arguments. You need to pass linking arguments. This is not done by default to reduce binary sizes.
- XorNot 1y agoBy default no for Go, but it's much easier to get their then Rust. 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).