Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 727fd6c

Browse files
authored
Add doc on the required environment for Metal (#292)
1 parent 22c1a7c commit 727fd6c

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ See [dockerfiles/README.md](./dockerfiles/README.md) for more options, including
7373

7474
- [Writing Hub kernels](./docs/writing-kernels.md)
7575
- [Building kernels with Nix](./docs/nix.md)
76+
- Framework-specific notes:
77+
- [Metal](docs/metal.md)
7678
- [Building kernels with Docker](./docs/docker.md) (for systems without Nix)
7779
- [Local kernel development](docs/local-dev.md) (IDE integration)
7880
- [Kernel security](./docs/security.md)

docs/metal.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Metal kernels 🤘
2+
3+
Instructions on this page assume that you installed Nix with the
4+
[Determinate Nix installer](https://docs.determinate.systems/determinate-nix/).
5+
6+
## Targeted macOS versions
7+
8+
Since new macOS versions get [adopted quickly](https://telemetrydeck.com/survey/apple/macOS/versions/),
9+
we only support the latest major macOS version except for the first weeks
10+
after a release, when we also support the previous major version.
11+
12+
We currently support macOS 26.0 and later on ARM64 (Apple silicon).
13+
14+
## Requirements
15+
16+
To build a Metal kernel, the following requirements must be met:
17+
18+
- Xcode 26.x must be available on the build machine.
19+
- `xcode-select -p` must point to the Xcode 26 installation, typically
20+
`/Applications/Xcode.app/Contents/Developer`. If this is not the case,
21+
you can set the path with:
22+
`sudo xcode-select -s /path/to/Xcode.app/Contents/Developer`
23+
- The Metal Toolchain must be installed. Starting with macOS 26, this is
24+
a separate download from Xcode. You can install it with:
25+
`xcodebuild -downloadComponent MetalToolchain`
26+
- The Nix sandbox should be set to `relaxed`, because the Nix derivation
27+
that builds the kernel must have access to Xcode and the Metal Toolchain.
28+
You can verify this by checking that `/etc/nix/nix.custom.conf` contains
29+
the line:
30+
31+
```
32+
sandbox = relaxed
33+
```
34+
35+
If you had to add the line, make sure to restart the Nix daemon:
36+
37+
```
38+
sudo launchctl kickstart -k system/systems.determinate.nix-daemon
39+
```
40+
41+
You can check these requirements as follows. First, you can check the Xcode
42+
version as follows:
43+
44+
```bash
45+
$ xcodebuild -version
46+
Xcode 26.1
47+
Build version 17B55
48+
```
49+
50+
The reported version must be 26.0 or newer. Then you can validate that the
51+
Metal Toolchain is installed with:
52+
53+
```bash
54+
$ xcodebuild -showComponent metalToolchain
55+
Asset Path: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/68d8db6212b48d387d071ff7b905df796658e713.asset/AssetData
56+
Build Version: 17B54
57+
Status: installed
58+
Toolchain Identifier: com.apple.dt.toolchain.Metal.32023
59+
Toolchain Search Path: /private/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.2.54.0.mDxgz0
60+
```

0 commit comments

Comments
 (0)