-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
feat: add app.runningUnderRosettaTranslation to detect running under rosetta #26444
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to come up with a 2nd use case so maybe this is moot -- but runningUnderRosettaTranslation()
is such a single-purpose call API that I wonder if something like String? emulatorEnvironment()
that returns rosetta
here would be more reusable for some currently-unknown future use.
👍 on including this, whatever its final form, in 11
Without building this is a super expansible way I don't think we can cover all the possible emulation scenarios. i.e. technically you could be under multiple layers of emulation (Rosetta --> Qemu for instance is how docker is going to work). Given the very targeted and current use case for this I don't think making it partially generic gives us too much for the future. Emulation is done differently on different platforms and each has it's own implications, i.e. I can see people being interested in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api lgtm, but let's reuse chrome's impl.
Release Notes Persisted
|
I have automatically backported this PR to "11-x-y", please check out #26492 |
As in title and notes, simple API, code is straight from apples docs.
Docs reference for rosetta detection: https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment?language=objc#3616845
Notes: Added new
app.runningUnderRosettaTranslation
property to detect when running under rosetta on Apple silicon