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

Detect ARM64 macOS running on Apple Silicon #22

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

jakejarvis
Copy link
Contributor

@jakejarvis jakejarvis commented Mar 10, 2021

This also distinguishes whether x64 Node is running because we're actually on an Intel Mac or if it's just Rosetta 2 pretending to be one. If there's someone smarter than me who has a cleaner method please chime in ;)

Regarding #19: I didn't touch the Linux logic because I don't have as strong of an understanding there (and it seems a lot tricker to do — is it safe to assume uname is on every machine?) but it'd be helpful to do the same thing there for both 32-bit and 64-bit ARM. If this PR looks good I can look further into it!

Also distinguishes whether 64-bit Node is running because we're actually on an Intel Mac or if it's just Rosetta 2 pretending to be one.
@LifeIsStrange
Copy link

I also read that one can use the WebGL Renderer value which is Apple M1 but only works for chromium
https://stackoverflow.com/a/64958299

@huima
Copy link

huima commented Sep 7, 2022

So is this pullrequest dead in the water and maintainer abandoned the project?

@huima
Copy link

huima commented Sep 7, 2022

Hey @feross could you take a look at this? This starts to hit more and more people as M1 chips get popular and there is unfortunately more and more node code that also downloads libraries / components that depend on the correct architecture info.

@LifeIsStrange
Copy link

BTW the best modern API for detecting architecture and bitness is WICG/proposals#40 (comment)

@XhmikosR
Copy link

@feross friendly ping!

@XhmikosR
Copy link

XhmikosR commented Feb 7, 2024

@feross another friendly ping :)

@feross feross merged commit 0ed871e into feross:master Feb 12, 2024
@feross
Copy link
Owner

feross commented Feb 12, 2024

3.0.0

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

Successfully merging this pull request may close these issues.

5 participants