You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nice thing is - you can actually steal this work very easily. :) these rust repos have very little to do with actual rust; they install rust sure, but the main logic is the builds and cross-builds, which is already done.
I have been able to build with go+musl myself like this:
Dockerfile:
FROM messense/rust-musl-cross:aarch64-musl AS go-arm64-musl
COPY --from=golang:1.19.1 /usr/local/go/ /usr/local/go/
#that's it... I just "steal" the rust image for go purposes
It would be nice if this package could build with musl instead of glibc.
Musl has the upside that it produces static library, always.
Rust has these docker images/repo
https://github.com/messense/rust-musl-cross
https://hub.docker.com/r/messense/rust-musl-cross/
which is based on this repo
https://github.com/richfelker/musl-cross-make
The nice thing is - you can actually steal this work very easily. :) these rust repos have very little to do with actual rust; they install rust sure, but the main logic is the builds and cross-builds, which is already done.
I have been able to build with go+musl myself like this:
Dockerfile:
Bash script to run:
This will use musl and build arm64 static library. I am actually not sure if the
extldflags "-static"
is necessary or not :)Note that it works on both ARM and AMD64 host PC, as the rust base images are built for both ARM and AMD64.
The text was updated successfully, but these errors were encountered: