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

Add support for Apple Silicon #76

Closed
phamann opened this issue Apr 13, 2022 · 3 comments
Closed

Add support for Apple Silicon #76

phamann opened this issue Apr 13, 2022 · 3 comments

Comments

@phamann
Copy link
Member

phamann commented Apr 13, 2022

We currently don't produce a target binary for apple silicon (i.e. arm64).

This should hopefully be a simple addition to the CI pipline matrix. However the current worflow in the CI pipeline makes certain assumptions that macOS is a single architecture, and therefore may need somne light refactoring.

@zakariamofaddel
Copy link

zakariamofaddel commented Apr 20, 2022

Hey Patrick😁
I've had issues with the @fastly/js-compute npm package, where there is a js-compute-runtime-cli.js file that checks the current platform the CLI is running on.
When running the cli commands on an M1 system everything works great, because you can see the Darwin version is included in this map in that file:

...

function getPlatform() {
  const osMap = {
    Windows_NT: {
      name: "windows",
      archs: {
        x64: "x86_64",
      },
    },
    Linux: {
      name: "linux",
      archs: {
        x64: "x86_64",
      },
    },
    Darwin: {
      name: "macos",
      archs: {
        arm64: "x86_64",
        x64: "x86_64",
      },
    },
  };
...

But when installing the cli on a debian based docker container running on the same M1 machine, I face an error, because osMap.Linux.archs is missing arm64

Is this related to this issue you opened? Is there a temporary solution for that or is there anything planned for it?

@JakeChampion
Copy link
Contributor

JakeChampion commented Jun 14, 2022

We currently don't produce a target binary for apple silicon (i.e. arm64).

This should hopefully be a simple addition to the CI pipline matrix. However the current worflow in the CI pipeline makes certain assumptions that macOS is a single architecture, and therefore may need somne light refactoring.

It looks like GitHub does not yet support arm64 hosted runners:
actions/runner-images#2187 (comment)
actions/runner-images#2552
If we wanted to add support for this by updating the matrix then we would need to create some arm64 machines to use as self-hosted GitHub runners.

There might be a way to do this without having to run on arm64 ourselves but I don't yet know how that would look

@JakeChampion
Copy link
Contributor

This was resolved when we rewrote the rust cli to JavaScript in version v0.5.7 🥳

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

No branches or pull requests

3 participants