2 ms·
Ah yeah, without CGO_ENABLED=0, you'll get a very cryptic error when the ELF binfmt can't find the linker binary... Never tried it with Rust, but I look to usi
by jchw 9y ago
Ah yeah, without CGO_ENABLED=0, you'll get a very cryptic error when the ELF binfmt can't find the linker binary...
Never tried it with Rust, but I look to using Rust in the future, so I guess I better find out what the flags are for Rust.
Sidenote: It's often useful to have ca certs and timezone info. At that point it's probably not a bad idea to just use Alpine and apk add those things.
- steveklabnik 9y agoBy default, Rust compiles all Rust code statically, but the standard library depends on a libc. If you want to use MUSL, you can. If you bind to C libraries, you may need to configure it or not, it depends on how the wrapper is written.
- seabrookmx 9y agoThanks for the clarification! There was a recent HN article that did a step-by-step using rust+musl on Alpine. The "why" makes more sense now.