Require macOS 12 and SDK 26 (#65994)

Closes https://github.com/zed-industries/zed/issues/9307

Use SDK 26 and require newer macOS.
The latter allows to remove a few deprecated API usages.

Release Notes:

- [GPUI] BREAKING: bumped minimum macOS version to 12 (Monterey)
This commit is contained in:
Kirill Bulatov
2026-10-26 11:20:07 +00:00
committed by GitHub
parent 1808df02c0
commit f14592c4a5
21 changed files with 103 additions and 52 deletions
+1 -1
View File
@@ -21,4 +21,4 @@ rustflags = [
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[env]
MACOSX_DEPLOYMENT_TARGET = "10.15.7"
MACOSX_DEPLOYMENT_TARGET = "12.0"
+1
View File
@@ -32,6 +32,7 @@ self-hosted-runner:
- namespace-profile-8x32-ubuntu-2004-arm-m4
# Namespace mac
- namespace-profile-mac-large
- namespace-profile-mac-large-xcode26
- namespace-profile-mac-small
# Self Hosted Runners
- self-mini-macos
+2 -2
View File
@@ -541,7 +541,7 @@ jobs:
- run_tests_mac
- clippy_mac
- check_scripts
runs-on: namespace-profile-mac-large
runs-on: namespace-profile-mac-large-xcode26
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
@@ -604,7 +604,7 @@ jobs:
- run_tests_mac
- clippy_mac
- check_scripts
runs-on: namespace-profile-mac-large
runs-on: namespace-profile-mac-large-xcode26
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
+2 -2
View File
@@ -264,7 +264,7 @@ jobs:
bundle_mac_aarch64:
needs:
- run_tests_linux
runs-on: namespace-profile-mac-large
runs-on: namespace-profile-mac-large-xcode26
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
@@ -331,7 +331,7 @@ jobs:
bundle_mac_x86_64:
needs:
- run_tests_linux
runs-on: namespace-profile-mac-large
runs-on: namespace-profile-mac-large-xcode26
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
+2 -2
View File
@@ -174,7 +174,7 @@ jobs:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: namespace-profile-mac-large
runs-on: namespace-profile-mac-large-xcode26
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
@@ -236,7 +236,7 @@ jobs:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: namespace-profile-mac-large
runs-on: namespace-profile-mac-large-xcode26
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
Generated
+12
View File
@@ -7557,6 +7557,7 @@ dependencies = [
"objc2-core-video",
"objc2-foundation 0.3.2",
"objc2-screen-capture-kit",
"objc2-uniform-type-identifiers",
"objc2-user-notifications",
"parking_lot",
"raw-window-handle",
@@ -11639,6 +11640,7 @@ dependencies = [
"objc2 0.6.3",
"objc2-core-foundation",
"objc2-foundation 0.3.2",
"objc2-uniform-type-identifiers",
]
[[package]]
@@ -11931,6 +11933,16 @@ dependencies = [
"objc2-quartz-core 0.3.2",
]
[[package]]
name = "objc2-uniform-type-identifiers"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7902ac02859fc1f7045f8b598c63f1ae0cc7efeaa06a9bc9f3d9a3c955974fa4"
dependencies = [
"objc2 0.6.3",
"objc2-foundation 0.3.2",
]
[[package]]
name = "objc2-user-notifications"
version = "0.3.2"
+1
View File
@@ -808,6 +808,7 @@ objc2-screen-capture-kit = { version = "=0.3.2", default-features = false, featu
"SCStream",
"std"
] }
objc2-uniform-type-identifiers = { version = "0.3", default-features = false, features = ["std", "UTCoreTypes", "UTType"] }
objc2-user-notifications = { version = "0.3", default-features = false, features = [
"std",
"block2",
+1 -1
View File
@@ -7,7 +7,7 @@ fn main() {
}
if cfg!(target_os = "macos") {
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=12.0");
}
// Populate git sha environment variable if git is available
+17 -4
View File
@@ -7,6 +7,8 @@ fn main() {
#[cfg(any(target_os = "macos", target_os = "ios"))]
mod apple_build {
#[cfg(not(feature = "runtime_shaders"))]
use std::ffi::OsString;
use std::{
env,
path::{Path, PathBuf},
@@ -126,6 +128,9 @@ mod apple_build {
fn compile_metal_shaders(header_path: &Path) {
use std::process::{self, Command};
println!("cargo:rerun-if-env-changed=SDKROOT");
println!("cargo:rerun-if-env-changed=DEVELOPER_DIR");
// Build scripts run on the host, so the target platform must come from
// Cargo's environment rather than `cfg!`. The target environment, not the
// target name, identifies simulators: `x86_64-apple-ios` has no `-sim` suffix.
@@ -134,7 +139,7 @@ mod apple_build {
let target_env = env::var("CARGO_CFG_TARGET_ENV")
.expect("Cargo sets CARGO_CFG_TARGET_ENV for build scripts");
let (sdk, minimum_version_argument) = match (target_os.as_str(), target_env.as_str()) {
("macos", _) => ("macosx", "-mmacosx-version-min=10.15.7"),
("macos", _) => ("macosx", "-mmacosx-version-min=12.0"),
("ios", "sim") => ("iphonesimulator", "-mios-simulator-version-min=15.0"),
("ios", "") => ("iphoneos", "-mios-version-min=15.0"),
_ => {
@@ -145,6 +150,12 @@ mod apple_build {
}
};
let sdk = if target_os == "macos" {
env::var_os("SDKROOT").unwrap_or_else(|| OsString::from(sdk))
} else {
OsString::from(sdk)
};
let shader_path = "./src/shaders.metal";
let air_output_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("shaders.air");
let metallib_output_path =
@@ -159,9 +170,9 @@ mod apple_build {
std::fs::copy(shader_path, &staged_shader_path).unwrap();
let output = Command::new("xcrun")
.arg("-sdk")
.arg(&sdk)
.args([
"-sdk",
sdk,
"metal",
"-gline-tables-only",
minimum_version_argument,
@@ -183,7 +194,9 @@ mod apple_build {
}
let output = Command::new("xcrun")
.args(["-sdk", sdk, "metallib"])
.arg("-sdk")
.arg(&sdk)
.arg("metallib")
.arg(&air_output_path)
.arg("-o")
.arg(metallib_output_path)
+2 -1
View File
@@ -42,12 +42,13 @@ image.workspace = true
itertools.workspace = true
log.workspace = true
objc2.workspace = true
objc2-app-kit.workspace = true
objc2-app-kit = { workspace = true, features = ["objc2-uniform-type-identifiers"] }
objc2-core-graphics = { workspace = true, features = ["CGColor", "objc2"] }
objc2-core-media = { workspace = true, optional = true }
objc2-core-video = { workspace = true, features = ["CVHostTime"] }
objc2-foundation.workspace = true
objc2-screen-capture-kit = { workspace = true, optional = true }
objc2-uniform-type-identifiers.workspace = true
objc2-user-notifications.workspace = true
parking_lot.workspace = true
raw-window-handle.workspace = true
+17 -14
View File
@@ -27,7 +27,7 @@ use ctor::ctor;
use futures::channel::oneshot;
use gpui_util::ResultExt;
use objc2::{
AnyThread, MainThreadMarker, class, msg_send,
AnyThread, MainThreadMarker, Message, class, msg_send,
rc::{Retained, autoreleasepool},
runtime::{AnyClass, AnyObject, AnyProtocol, Bool, ClassBuilder, ProtocolObject, Sel},
sel,
@@ -52,6 +52,7 @@ use objc2_foundation::{
NSArray, NSInteger, NSNotFound, NSOperatingSystemVersion, NSPoint, NSProcessInfo, NSRect,
NSSize, NSString, NSUInteger, NSURL,
};
use objc2_uniform_type_identifiers::{UTType, UTTypeData, UTTypeFolder};
use parking_lot::Mutex;
use raw_window_handle as rwh;
use smallvec::SmallVec;
@@ -2264,25 +2265,27 @@ impl PlatformWindow for MacWindow {
// recommendation for large item counts), and by file *type* rather than
// `iconForFile:`, which can synchronously hit LaunchServices, network
// mounts, or iCloud for every selected path and beachball drag startup.
// `iconForFileType:` is deprecated in favor of `iconForContentType:`,
// but the replacement requires macOS 11 and we target 10.15.
let file_type = if *is_directory {
"public.folder".to_string()
} else {
path.extension()
let is_directory = *is_directory;
let extension = path
.extension()
.and_then(|extension| extension.to_str())
.map(|extension| extension.to_string())
.unwrap_or_else(|| "public.data".to_string())
};
.map(String::from);
let provider = RcBlock::new(move || {
let component = NSDraggingImageComponent::draggingImageComponentWithKey(
NSDraggingImageComponentIconKey,
);
let workspace = NSWorkspace::sharedWorkspace();
let file_type = NSString::from_str(&file_type);
// TODO: Replace with `iconForContentType` once Zed no longer supports MacOS 10.15
#[expect(deprecated, reason = "Support for MacOS 10.15")]
let icon = workspace.iconForFileType(&file_type);
let content_type = if is_directory {
UTTypeFolder.retain()
} else {
extension
.as_ref()
.and_then(|extension| {
UTType::typeWithFilenameExtension(&NSString::from_str(extension))
})
.unwrap_or_else(|| UTTypeData.retain())
};
let icon = workspace.iconForContentType(&content_type);
component.setContents(Some(&icon));
// Component frames are relative to the item's dragging frame.
component.setFrame(NSRect::new(NSPoint::new(0., 0.), NSSize::new(32., 32.)));
+4 -4
View File
@@ -288,7 +288,7 @@ icon = ["resources/app-icon-dev@2x.png", "resources/app-icon-dev.png"]
identifier = "dev.zed.Zed-Dev"
name = "Zed Dev"
category = "Developer Tool"
osx_minimum_system_version = "10.15.7"
osx_minimum_system_version = "12.0"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]
@@ -297,7 +297,7 @@ icon = ["resources/app-icon-nightly@2x.png", "resources/app-icon-nightly.png"]
identifier = "dev.zed.Zed-Nightly"
name = "Zed Nightly"
category = "Developer Tool"
osx_minimum_system_version = "10.15.7"
osx_minimum_system_version = "12.0"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]
@@ -306,7 +306,7 @@ icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
identifier = "dev.zed.Zed-Preview"
name = "Zed Preview"
category = "Developer Tool"
osx_minimum_system_version = "10.15.7"
osx_minimum_system_version = "12.0"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]
@@ -315,7 +315,7 @@ icon = ["resources/app-icon@2x.png", "resources/app-icon.png"]
identifier = "dev.zed.Zed"
name = "Zed"
category = "Developer Tool"
osx_minimum_system_version = "10.15.7"
osx_minimum_system_version = "12.0"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]
+1 -3
View File
@@ -24,9 +24,8 @@ fn main() {
}
if cfg!(target_os = "macos") {
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=12.0");
// Weakly link ReplayKit to ensure Zed can be used on macOS 10.15+.
println!("cargo:rustc-link-arg=-Wl,-weak_framework,ReplayKit");
// Seems to be required to enable Swift concurrency
@@ -35,7 +34,6 @@ fn main() {
// Register exported Objective-C selectors, protocols, etc
println!("cargo:rustc-link-arg=-Wl,-ObjC");
// weak link to support Catalina
println!("cargo:rustc-link-arg=-Wl,-weak_framework,ScreenCaptureKit");
}
+3
View File
@@ -36,6 +36,9 @@ Clone the [Zed repository](https://github.com/zed-industries/zed).
brew install cmake
```
Release bundling with `script/bundle-mac` requires the macOS 26 SDK or newer, provided by Xcode 26 or newer.
The bundled app requires macOS 12.0 (Monterey) or later.
## Building Zed from Source
Once you have the dependencies installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).
+11 -8
View File
@@ -67,19 +67,22 @@ If this script is insufficient for your use case, you run into problems running
### macOS
Zed supports the following macOS releases:
Zed requires macOS 12.0 (Monterey) or later.
| Version | Codename | Apple Status | Zed Status |
| ------------- | -------- | -------------- | ------------------- |
| ------------------ | ----------- | -------------- | ------------------- |
| macOS 27.x | Golden Gate | Supported | Supported |
| macOS 26.x | Tahoe | Supported | Supported |
| macOS 15.x | Sequoia | Supported | Supported |
| macOS 14.x | Sonoma | Supported | Supported |
| macOS 13.x | Ventura | Supported | Supported |
| macOS 12.x | Monterey | EOL 2024-09-16 | Supported |
| macOS 11.x | Big Sur | EOL 2023-09-26 | Partially Supported |
| macOS 10.15.x | Catalina | EOL 2022-09-12 | Partially Supported |
| macOS 14.x | Sonoma | EOL 2026-09-14 | Supported |
| macOS 13.x | Ventura | EOL 2025-09-15 | Supported |
| macOS 12.x (12.3+) | Monterey | EOL 2024-09-16 | Supported |
| macOS 12.0–12.2 | Monterey | EOL 2024-09-16 | Partially Supported |
The macOS releases labelled "Partially Supported" (Big Sur and Catalina) do not support screen sharing via Zed Collaboration. These features use the [LiveKit SDK](https://livekit.io) which relies upon [ScreenCaptureKit.framework](https://developer.apple.com/documentation/screencapturekit/) only available on macOS 12 (Monterey) and newer.
The macOS releases labelled "Partially Supported" (Monterey 12.0–12.2) do not support screen sharing via Zed Collaboration.
Screen sharing uses [ScreenCaptureKit.framework](https://developer.apple.com/documentation/screencapturekit/), which is available on macOS 12.3 and newer.
Apple support status and EOL dates are from [endoflife.date](https://endoflife.date/macos).
#### Mac Hardware
+1 -1
View File
@@ -35,7 +35,7 @@ To build Zed from source, see the [macOS development documentation](./developmen
## System Requirements
- macOS 10.15.7 (Catalina) or later
- macOS 12.0 (Monterey) or later
- Apple Silicon (M1/M2/M3/M4) or Intel processor
Zed uses Metal for GPU-accelerated rendering, which is available on all supported macOS versions.
+1 -1
View File
@@ -35,7 +35,7 @@ For simple cases where you don't need any SSH arguments, you can run `zed ssh://
The remote machine must be able to run Zed's server. The following platforms should work, though note that we have not exhaustively tested every Linux distribution:
- macOS Catalina or later (Intel or Apple Silicon)
- macOS 12.0 (Monterey) or later (Intel or Apple Silicon)
- Linux (x86_64 or arm64, we do not yet support 32-bit platforms)
- Windows (x86_64 or arm64)
+3 -3
View File
@@ -4,7 +4,7 @@
lib,
stdenv,
apple-sdk_15,
apple-sdk_26,
darwin,
darwinMinVersionHook,
@@ -206,8 +206,8 @@ let
libxrandr
]
++ lib.optionals stdenv'.hostPlatform.isDarwin [
apple-sdk_15
(darwinMinVersionHook "10.15")
apple-sdk_26
(darwinMinVersionHook "12.0")
];
cargoExtraArgs = "-p zed -p cli --locked --features=gpui_platform/runtime_shaders";
+15
View File
@@ -50,6 +50,21 @@ done
shift $((OPTIND-1))
if [[ -z "${SDKROOT+x}" ]]; then
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
fi
if [[ "$SDKROOT" != /* || ! -f "$SDKROOT/SDKSettings.plist" ]] ||
! sdk_name=$(/usr/libexec/PlistBuddy -c 'Print :CanonicalName' "$SDKROOT/SDKSettings.plist" 2>/dev/null) ||
! sdk_version=$(/usr/libexec/PlistBuddy -c 'Print :Version' "$SDKROOT/SDKSettings.plist" 2>/dev/null) ||
[[ ! "$sdk_name" =~ ^macosx[0-9]+(\.[0-9]+){0,2}$ ||
! "$sdk_version" =~ ^[0-9]+(\.[0-9]+){0,2}$ ]] ||
(( 10#${sdk_version%%.*} < 26 )); then
echo "macOS SDK 26 or newer is required; set SDKROOT to a valid macOS SDK directory (selected: $SDKROOT)." >&2
exit 1
fi
export SDKROOT
export MACOSX_DEPLOYMENT_TARGET=12.0
echo "Using macOS SDK $sdk_version at $SDKROOT (deployment target 12.0)"
# Get release channel
pushd crates/zed
@@ -93,7 +93,7 @@ pub(crate) fn bundle_mac(
NamedJob {
name: format!("bundle_mac_{arch}"),
job: bundle_job(deps)
.runs_on(runners::MAC_DEFAULT)
.runs_on(runners::MAC_BUNDLER)
.envs(bundle_envs(platform))
.add_step(steps::checkout_repo())
.add_step(steps::cache_rust_dependencies_namespace())
@@ -14,6 +14,7 @@ pub const LINUX_ARM_BUNDLER: Runner = Runner("namespace-profile-8x32-ubuntu-2004
pub const LINUX_LARGE_RAM: Runner = Runner("namespace-profile-8x32-ubuntu-2404");
pub const MAC_DEFAULT: Runner = Runner("namespace-profile-mac-large");
pub const MAC_BUNDLER: Runner = Runner("namespace-profile-mac-large-xcode26");
pub const MAC_SMALL: Runner = Runner("namespace-profile-mac-small");
pub const WINDOWS_DEFAULT: Runner = Runner("self-32vcpu-windows-2022");