mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-21 05:31:11 +00:00
This moves three pieces of macOS platform code into `gpui_apple` so the upcoming iOS backend (#63068) can share them: the CoreText text system, the Keychain credential helpers, and thermal-state reporting. macOS behaves the same as before. Credential reads still return `None` when nothing is stored or the prompt is canceled, deleting a missing credential is still an error, and text rendering keeps font smoothing and dilation. Along the way the Keychain and OpenType code switch from hand-written FFI to the generated objc2 bindings, which also fixes an over-release of temporary CoreText feature strings, and thermal notifications now reach the main thread through a channel instead of a raw-pointer `dispatch_async_f`. It also replaces the old `core-video` crate with `objc2-core-video`, because `core-video` pulls in `io-surface` and `cgl`, which link OpenGL and break iOS builds. That changes GPUI's public surface API: `SurfaceSource`, `PaintSurface`, and `Window::paint_surface` now take `CFRetained<objc2_core_video::CVPixelBuffer>`, and LiveKit's video frames follow suit. I tested this with the gpui, gpui_apple, and gpui_macos test suites, including a new Metal test that renders a real NV12 pixel buffer, plus checks of the `zed` and `remote_server` builds; the iOS link was verified on the iOS branch. LiveKit playback and the Keychain paths are only compile-checked, so a quick sign-in/sign-out on macOS before relying on this is worth doing. Release Notes: - [GPUI] Added shared Apple CoreText text rendering, Keychain, and thermal-state services in `gpui_apple`, and migrated `SurfaceSource`, `PaintSurface`, and `Window::paint_surface` from `core-video`'s `CVPixelBuffer` to `CFRetained<objc2_core_video::CVPixelBuffer>` |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||