Skip to content

Apple platform bridge

State: open/building · Kind: adapter · Audience: system

  • Gives the fleet access to Apple frameworks without any other crate being macOS-only, except for Foundation Models.
  • Most bridges are subprocesses with a JSON contract (Vision, EventKit, Mail, sips). Photos reads a copied SQLite database and workspace verbs run open. Every trait has an Unsupported stub for non-macOS builds.

This crate is the only place in the determined fleet that may depend on the macOS platform. Other crates depend on its traits (TextRecognizer, ReminderStore, MailReader, PhotosLibrary, ImageTranscoder, ExtendedDecoder, Workspace) and call the platform factory functions, so they never write a cfg of their own, except for Foundation Models, whose consumers gate it with a target cfg. They still build on Linux CI. The Vision, EventKit, Mail and sips bridges shell an existing helper (compiled Swift, osascript/JXA, sips) and speak JSON. Photos reads a copy of Photos.sqlite, and Workspace runs plain open. The helper binary is a seam: prebuilt or compiled on demand, or a canned script in tests. On non-macOS the stubs return an Unsupported error value instead of panicking.

  • Text recognition through Vision, keeping bounding boxes
  • Reminders read and write through EventKit or JXA
  • Apple Mail message reading with a prefilter
  • Photos library access and asset metadata
  • HEIC/AVIF decoding through sips with a keyed transcode cache
  • Foundation Models capture interpretation helper, outside the factory and stub scheme
  • Platform factory that returns the real implementation on macOS and a stub elsewhere for the other bridges
  • solutions/determined/crates/determined-macos/src/platform.rs
  • solutions/determined/crates/determined-macos/src/helper.rs
  • solutions/determined/crates/determined-macos/swift/vision-ocr.swift
  • solutions/determined/crates/determined-macos/
  • solutions/determined/crates/determined-macos/src/platform.rs#text_recognizer
  • solutions/determined/crates/determined-macos/src/helper.rs#HelperBinary
  • solutions/determined/crates/determined-macos/src/unsupported.rs
  • solutions/determined/crates/determined-macos/src/ocr.rs#VisionTextRecognizer
  • solutions/determined/crates/determined-macos/src/reminders.rs#EventKitReminderStore
  • solutions/determined/crates/determined-macos/src/mail.rs#AppleMailReader
  • solutions/determined/crates/determined-macos/src/photos.rs#ApplePhotosLibrary
  • solutions/determined/crates/determined-macos/src/heic.rs#SipsTranscoder
  • solutions/determined/crates/determined-macos/src/workspace.rs#MacWorkspace
  • solutions/determined/crates/determined-macos/swift/

← Back to Capabilities