crates-build-env icon indicating copy to clipboard operation
crates-build-env copied to clipboard

Add support for linux/arm64

Open JanBerktold opened this issue 2 years ago • 5 comments

JanBerktold avatar Nov 11 '22 00:11 JanBerktold

When would this be used? docs.rs and Crater both only build on one host platform.

jyn514 avatar Nov 11 '22 00:11 jyn514

When would this be used? docs.rs and Crater both only build on one host platform.

You're fast! I haven't even made it work yet.

I'm currently exploring setting up a self-hosted instance of docs.rs for which we'd like to build on an arm64 machine. Additionally, I ran into blockers attempting to develop against docs.rs on my MacBook with Apple Silicon (the build of crates just fails since it attempts to run the docker container w/o enabling virtualization).

Would you be open to accepting a change that adds a dual targeting for the linux-micro image? It appears that the linux image uses packages that are inherently not compatible w/ arm64 anyway.

JanBerktold avatar Nov 11 '22 00:11 JanBerktold

I'm currently exploring setting up a self-hosted instance of docs.rs for which we'd like to build on an arm64 machine. Additionally, I ran into blockers attempting to develop against docs.rs on my MacBook with Apple Silicon (the build of crates just fails since it attempts to run the docker container w/o enabling virtualization).

IMO the fix there is to use a docker container for the main docs.rs server as well as for the build sandboxing.

jyn514 avatar Nov 11 '22 01:11 jyn514

In general it should be possible to run docs.rs on any host as long as it supports an x86 linux docker container. But we currently don't distinguish the host toolchain from the target toolchain, so the host is locked to x86 linux. That's a docs.rs bug, not a crates-build-env bug.

jyn514 avatar Nov 11 '22 01:11 jyn514

I'm currently exploring setting up a self-hosted instance of docs.rs for which we'd like to build on an arm64 machine. Additionally, I ran into blockers attempting to develop against docs.rs on my MacBook with Apple Silicon (the build of crates just fails since it attempts to run the docker container w/o enabling virtualization).

IMO the fix there is to use a docker container for the main docs.rs server as well as for the build sandboxing.

This doesn't work with apple silicon any more, didn't I get to working through fixing this yet.

syphar avatar Nov 11 '22 05:11 syphar