Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pieterclaerhout/detectapplesilicon
Detecting Apple Silicon using Go
https://github.com/pieterclaerhout/detectapplesilicon
Last synced: 9 days ago
JSON representation
Detecting Apple Silicon using Go
- Host: GitHub
- URL: https://github.com/pieterclaerhout/detectapplesilicon
- Owner: pieterclaerhout
- Created: 2020-12-15T18:01:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-29T18:02:34.000Z (9 months ago)
- Last Synced: 2024-06-21T16:55:44.872Z (5 months ago)
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Detecting Apple Silicon via Golang
## Build
1. Install [`gotip`](https://www.yellowduck.be/posts/running-go-from-dev-tree/) or Go 1.16
2. Run `make detectapplesilicon`
## Running
On an Intel mac:
```
$ ./detectapplesilicon
Running on intel mac, arch: amd64
```Natively on an Apple Silicon mac:
```
$ ./detectapplesilicon
Running on apple silicon natively, arch: arm64
```Running via Rosetta 2
```
$ arch -arch x86_64 ./detectapplesilicon
Running on apple silicon under Rosetta 2, arch: amd64
```Based on https://steipete.com/posts/apple-silicon-mac-mini-for-ci/#detecting-apple-silicon-via-scripts.