arch icon indicating copy to clipboard operation
arch copied to clipboard

Detect ARM64 macOS running on Apple Silicon

Open jakejarvis opened this issue 4 years ago • 5 comments

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!

jakejarvis avatar Mar 10 '21 20:03 jakejarvis

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

LifeIsStrange avatar Oct 25 '21 18:10 LifeIsStrange

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

huima avatar Sep 07 '22 09:09 huima

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.

huima avatar Sep 07 '22 09:09 huima

BTW the best modern API for detecting architecture and bitness is https://github.com/WICG/proposals/issues/40#issuecomment-951671609

LifeIsStrange avatar Sep 07 '22 17:09 LifeIsStrange

@feross friendly ping!

XhmikosR avatar Nov 11 '22 05:11 XhmikosR