2 ms·
The author is probably compiling inside an x86 container on his Mac M1. Doing anything in an x86 container/vm is extremely slow on the Mac M1 as it’s arm64 not
by BFLpL0QNek 4y ago
The author is probably compiling inside an x86 container on his Mac M1. Doing anything in an x86 container/vm is extremely slow on the Mac M1 as it’s arm64 not x86. That specific issue is nothing to do with Rust.
Why the author is doing this I do not know.
Rust does cross compilation fairly easily out the box. If the author needs an x86 Docker image they can compile an x86 static binary without Docker then copy the binary in to the container. It’s a trivially simple workflow and you end up with tiny Docker containers.
FROM scratch
COPY target/my/binary /bin/binary
ENTRYPOINT [/bin/binary]
- deleted 4y ago[deleted]