Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explore building an arm64 variant #97

Closed
clux opened this issue May 22, 2022 · 5 comments · Fixed by #133
Closed

explore building an arm64 variant #97

clux opened this issue May 22, 2022 · 5 comments · Fixed by #133

Comments

@clux
Copy link
Owner

clux commented May 22, 2022

As energy use and costs for arm64 compute is lower than ever (e.g. aws graviton), it makes sense to provide an arm64 tagged build if possible/necessary.

Do not have a lot of experience in this avenue yet so input welcome. But will try to look into this shortly. Only thing I've found so far is the rust on graviton doc.

Optimising for energy use is probably the main thing we as software engineers can do inside our occupation towards climate change (outside; direct action ✊ ❤️‍🔥).

@RobbieMcKinstry
Copy link

Hello! I came across this issue because I was trying to build Rust images with musl for both x86_64 and arm64. I'd love to see this feature added because I had a lot of trouble getting SQLx to compile for arm64.

I had two errors around Ring (the cryptographic primitive library) cross-compiling, perhaps because it uses inline assembly, and finding OpenSSL headers for the native tlsfeature of tokio/SQLx. I feel confident this can be done, and perhaps without a ton of effort.

@clux
Copy link
Owner Author

clux commented May 11, 2023

Hey @RobbieMcKinstry! late response, but would love to see ideas for how if you have time!

@SamTV12345
Copy link

I'd love to help. There is this image which works: https://github.com/rust-cross/rust-musl-cross but the owner refuses to add the relevant libraries for compiling sqlite, Postgres etc.

@clux
Copy link
Owner Author

clux commented Sep 18, 2023

Any help would be very much welcome here as I haven't gotten the time to really work on this.

Having this as a multiarch image here would even help me quite a bit with some of the upstream use-cases in kube-rs org so have a pretty good incentive to keep maintaining.

I did look around to see how to do this in august for a bit, so will inline the interesting links below for what could be helpful as resources (because people do do this elsewhere):

(it's also possible to push the image as a multi-arch image so people do not need to disambiguate with tags, but that can be a much later step two.)

@clux
Copy link
Owner Author

clux commented Feb 27, 2024

as of today muslrust now builds with both arm64 and amd64 thanks to @eranrund in #133 🥇

new stable and nightly images have now been pushed https://hub.docker.com/repository/docker/clux/muslrust/tags?page=1&ordering=last_updated and can be used without any tag suffixes (so you can in theory build both amd64 and arm64 variants without having different dockerfiles - will try to poc this in version-rs later)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants