From 62296d9d3793546350d3a8b9c0872452901927f1 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Thu, 26 Jan 2023 02:00:53 +0900 Subject: [PATCH 1/2] iOS support --- .github/workflows/rust.yml | 174 +++++- bindgen/Bindgen.toml | 27 + bindgen/Cargo.toml | 17 +- bindgen/src/builder.rs | 8 +- bindgen/src/main.rs | 4 +- bindgen/src/sdk.rs | 2 +- sys/Cargo.toml | 28 + sys/build.rs | 17 +- sys/build_features.inc.rs | 198 ------- sys/configure.py | 131 +++-- sys/ios.inc.rs | 160 ++++++ sys/macos.inc.rs | 198 +++++++ sys/src/lib.rs | 1030 +++++++++++++++++++++++++++++------- 13 files changed, 1539 insertions(+), 455 deletions(-) delete mode 100644 sys/build_features.inc.rs create mode 100644 sys/ios.inc.rs create mode 100644 sys/macos.inc.rs diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5e9cdab..bf6564f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,7 +19,7 @@ jobs: - name: Tool run: cargo run --features=bin --manifest-path=bindgen/Cargo.toml --verbose CoreFoundation --sdk macosx - sys: + sys-macos: strategy: matrix: feature: [ @@ -224,3 +224,175 @@ jobs: - uses: actions/checkout@v3 - name: Build run: cargo build --manifest-path=sys/Cargo.toml --verbose --features ${{ matrix.feature }} + sys-ios: + strategy: + matrix: + feature: [ + ARKit, + AVFAudio, + AVFoundation, + AVKit, + AVRouting, + Accelerate, + Accessibility, + Accounts, + ActivityKit, + AdServices, + AdSupport, + AddressBook, + # AddressBookUI, + AppClip, + AppIntents, + AppTrackingTransparency, + AssetsLibrary, + AudioToolbox, + AudioUnit, + AuthenticationServices, + AutomaticAssessmentConfiguration, + BackgroundAssets, + BackgroundTasks, + BusinessChat, + CFNetwork, + CallKit, + CarPlay, + ClassKit, + ClockKit, + CloudKit, + ColorSync, + Contacts, + ContactsUI, + CoreAudio, + CoreAudioKit, + CoreBluetooth, + CoreData, + CoreFoundation, + CoreGraphics, + CoreHaptics, + CoreImage, + CoreLocation, + CoreLocationUI, + CoreMIDI, + CoreML, + CoreMedia, + CoreMotion, + CoreNFC, + CoreServices, + CoreSpotlight, + CoreTelephony, + CoreText, + CoreTransferable, + CoreVideo, + CryptoTokenKit, + DataDetection, + DeviceCheck, + DeviceDiscoveryExtension, + EventKit, + EventKitUI, + ExposureNotification, + ExtensionFoundation, + ExtensionKit, + ExternalAccessory, + FileProvider, + FileProviderUI, + Foundation, + GLKit, + GSS, + GameController, + GameKit, + GameplayKit, + HealthKit, + HealthKitUI, + HomeKit, + IOSurface, + IdentityLookup, + IdentityLookupUI, + ImageCaptureCore, + ImageIO, + Intents, + IntentsUI, + JavaScriptCore, + LinkPresentation, + LocalAuthentication, + LocalAuthenticationEmbeddedUI, + MLCompute, + MapKit, + Matter, + MatterSupport, + MediaAccessibility, + MediaPlayer, + MediaSetup, + MediaToolbox, + MessageUI, + Messages, + Metal, + MetalFX, + MetalKit, + # MetalPerformanceShaders, + # MetalPerformanceShadersGraph, + MetricKit, + MobileCoreServices, + ModelIO, + MultipeerConnectivity, + NaturalLanguage, + NearbyInteraction, + Network, + NetworkExtension, + NewsstandKit, + NotificationCenter, + OSLog, + OpenAL, + OpenGLES, + PDFKit, + PHASE, + PassKit, + PencilKit, + Photos, + PhotosUI, + ProximityReader, + PushKit, + PushToTalk, + QuartzCore, + QuickLook, + QuickLookThumbnailing, + ReplayKit, + RoomPlan, + SafariServices, + SafetyKit, + SceneKit, + ScreenTime, + Security, + SensorKit, + SharedWithYou, + SharedWithYouCore, + ShazamKit, + Social, + SoundAnalysis, + Speech, + SpriteKit, + StoreKit, + SwiftUI, + SystemConfiguration, + ThreadNetwork, + Twitter, + UIKit, + UniformTypeIdentifiers, + UserNotifications, + UserNotificationsUI, + VideoSubscriberAccount, + VideoToolbox, + Vision, + VisionKit, + WatchConnectivity, + # WebKit, -- exceed max arg + WidgetKit, + iAd + ] + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: prepare iOS build + uses: dtolnay/rust-toolchain@stable + with: + target: aarch64-apple-ios + - name: Build + run: cargo build --target=aarch64-apple-ios --manifest-path=sys/Cargo.toml --verbose --features ${{ matrix.feature }} diff --git a/bindgen/Bindgen.toml b/bindgen/Bindgen.toml index 34389eb..7f3d9d3 100644 --- a/bindgen/Bindgen.toml +++ b/bindgen/Bindgen.toml @@ -34,6 +34,27 @@ impl NSScreen_ for NSScreen {} pub trait NSScreen_: Sized + std::ops::Deref { #=># } """, """impl NSImage_ for NSImage {}\n\n #=># """, + + # UIKit + """unsafe fn dividerImageForLeftSegmentState_rightSegmentState_( + &self, + state: UIControlState, + state: UIControlState, + ) -> UIImage + where + ::Target: objc::Message + Sized, + { + msg_send ! (* self , dividerImageForLeftSegmentState : state rightSegmentState : state) + } #=># unsafe fn dividerImageForLeftSegmentState_rightSegmentState_( + &self, + leftState: UIControlState, + rightState: UIControlState, + ) -> UIImage + where + ::Target: objc::Message + Sized, + { + msg_send ! (* self , dividerImageForLeftSegmentState : leftState rightSegmentState : rightState) + }""" ] [SyncServices] replacements = [ @@ -55,3 +76,9 @@ replacements = [ deps = ["PDFKit"] [QuickLookUI] deps = ["PDFKit"] + +# iOS +[ARKit] +deps = ["PDFKit"] +[QuickLook] +deps = ["PDFKit"] diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml index 938a515..b1fb7e8 100644 --- a/bindgen/Cargo.toml +++ b/bindgen/Cargo.toml @@ -14,16 +14,15 @@ include = ["*.toml", "/src"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bindgen = "0.60.1" -serde = { version = "1.0.140", features = ["derive"] } -serde_derive = "1.0.140" -toml = "0.5.9" -derive_more = { version = "0.99.17" } -apple-sdk = "0.1.0" -thiserror = "1.0.31" +bindgen = "0.63" +serde = { version = "1.0", features = ["derive"] } +toml = "0.6" +derive_more = { version = "0.99" } +apple-sdk = "0.4" +thiserror = "1.0" +regex = "1.7" -clap = { version = "3.2.14", features = ["derive"], optional = true } -regex = "1.7.1" +clap = { version = "4.1", features = ["derive"], optional = true } [features] default = ["bin"] # required-featues for apple-bindgen binary diff --git a/bindgen/src/builder.rs b/bindgen/src/builder.rs index a65a945..bc18406 100644 --- a/bindgen/src/builder.rs +++ b/bindgen/src/builder.rs @@ -53,7 +53,13 @@ impl Builder { clang_args.push(&target_arg); } - clang_args.extend(&["-isysroot", self.sdk.path().to_str().unwrap()]); + clang_args.extend(&[ + "-isysroot", + self.sdk + .path() + .to_str() + .expect("sdk path is not utf-8 representable"), + ]); builder = builder .clang_args(&clang_args) diff --git a/bindgen/src/main.rs b/bindgen/src/main.rs index dd921da..ca253db 100644 --- a/bindgen/src/main.rs +++ b/bindgen/src/main.rs @@ -3,7 +3,7 @@ use apple_sdk::Platform; use clap::Parser; use std::{path::PathBuf, str::FromStr}; -#[derive(Debug)] +#[derive(Debug, Clone)] enum Sdk { Name(Platform), Path(SdkPath), @@ -47,7 +47,7 @@ struct Args { target: Option, /// Print build details - #[clap(short, long, takes_value = false)] + #[clap(short, long, num_args = 0)] verbose: bool, } diff --git a/bindgen/src/sdk.rs b/bindgen/src/sdk.rs index 5ad8d93..6329f33 100644 --- a/bindgen/src/sdk.rs +++ b/bindgen/src/sdk.rs @@ -18,7 +18,7 @@ pub enum SdkPathError { XcrunError(std::io::Error), } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct SdkPath(PathBuf); impl SdkPath { diff --git a/sys/Cargo.toml b/sys/Cargo.toml index bf335ad..ab1579c 100644 --- a/sys/Cargo.toml +++ b/sys/Cargo.toml @@ -18,6 +18,7 @@ objc = { version = "0.2.7", optional = true } [build-dependencies] apple-bindgen = { path = "../bindgen", version = "0.1.3", default-features=false } +apple-sdk = "0.4.0" [features] default = ["objc"] @@ -25,6 +26,7 @@ __allow_empty = [] # AUTO-GENERATED: DO NOT ADD ANYTHING BELOW THIS LINE AGL = [] +ARKit = [] AVFAudio = [] AVFoundation = [] AVKit = [] @@ -32,15 +34,19 @@ AVRouting = [] Accelerate = [] Accessibility = [] Accounts = [] +ActivityKit = [] AdServices = [] AdSupport = [] AddressBook = [] +AddressBookUI = [] +AppClip = [] AppIntents = [] AppKit = [] AppTrackingTransparency = [] AppleScriptKit = [] AppleScriptObjC = [] ApplicationServices = [] +AssetsLibrary = [] AudioToolbox = [] AudioUnit = [] AudioVideoBridging = [] @@ -53,8 +59,10 @@ BusinessChat = [] CFNetwork = [] CalendarStore = [] CallKit = [] +CarPlay = [] Carbon = [] ClassKit = [] +ClockKit = [] CloudKit = [] Cocoa = [] Collaboration = [] @@ -70,11 +78,13 @@ CoreGraphics = [] CoreHaptics = [] CoreImage = [] CoreLocation = [] +CoreLocationUI = [] CoreMIDI = [] CoreML = [] CoreMedia = [] CoreMediaIO = [] CoreMotion = [] +CoreNFC = [] CoreServices = [] CoreSpotlight = [] CoreTelephony = [] @@ -86,11 +96,13 @@ CryptoTokenKit = [] DVDPlayback = [] DataDetection = [] DeviceCheck = [] +DeviceDiscoveryExtension = [] DirectoryService = [] DiscRecording = [] DiscRecordingUI = [] DiskArbitration = [] EventKit = [] +EventKitUI = [] ExceptionHandling = [] ExecutionPolicy = [] ExposureNotification = [] @@ -109,6 +121,8 @@ GameController = [] GameKit = [] GameplayKit = [] HealthKit = [] +HealthKitUI = [] +HomeKit = [] Hypervisor = [] ICADevices = [] IMServicePlugIn = [] @@ -118,6 +132,7 @@ IOKit = [] IOSurface = [] IOUSBHost = [] IdentityLookup = [] +IdentityLookupUI = [] ImageCaptureCore = [] ImageIO = [] InputMethodKit = [] @@ -139,16 +154,21 @@ MLCompute = [] MailKit = [] MapKit = [] Matter = [] +MatterSupport = [] MediaAccessibility = [] MediaLibrary = [] MediaPlayer = [] +MediaSetup = [] MediaToolbox = [] +MessageUI = [] +Messages = [] Metal = [] MetalFX = [] MetalKit = [] MetalPerformanceShaders = [] MetalPerformanceShadersGraph = [] MetricKit = [] +MobileCoreServices = [] ModelIO = [] MultipeerConnectivity = [] NaturalLanguage = [] @@ -156,6 +176,7 @@ NearbyInteraction = [] NetFS = [] Network = [] NetworkExtension = [] +NewsstandKit = [] NotificationCenter = [] OSAKit = [] OSLog = [] @@ -163,6 +184,7 @@ OpenAL = [] OpenCL = [] OpenDirectory = [] OpenGL = [] +OpenGLES = [] PCSC = [] PDFKit = [] PHASE = [] @@ -172,6 +194,7 @@ PencilKit = [] Photos = [] PhotosUI = [] PreferencePanes = [] +ProximityReader = [] PushKit = [] PushToTalk = [] Quartz = [] @@ -180,6 +203,7 @@ QuickLook = [] QuickLookThumbnailing = [] QuickLookUI = [] ReplayKit = [] +RoomPlan = [] SafariServices = [] SafetyKit = [] SceneKit = [] @@ -207,6 +231,8 @@ SystemExtensions = [] TWAIN = [] Tcl = [] ThreadNetwork = [] +Twitter = [] +UIKit = [] UniformTypeIdentifiers = [] UserNotifications = [] UserNotificationsUI = [] @@ -216,7 +242,9 @@ VideoToolbox = [] Virtualization = [] Vision = [] VisionKit = [] +WatchConnectivity = [] WebKit = [] WidgetKit = [] +iAd = [] iTunesLibrary = [] vmnet = [] diff --git a/sys/build.rs b/sys/build.rs index d3ea245..d825a3f 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -2,9 +2,20 @@ use apple_bindgen::Builder; use std::io::Write; fn main() { - println!("cargo:rerun-if-changed=build_features.inc.rs"); + println!("cargo:rerun-if-changed=macos.inc.rs"); + println!("cargo:rerun-if-changed=ios.inc.rs"); - let frameworks = include!("build_features.inc.rs"); + let target = std::env::var("TARGET").expect("env TARGET must be set"); + let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); + + let frameworks = match target_os.as_str() { + "macos" => include!("macos.inc.rs"), + "ios" => include!("ios.inc.rs"), + unknown => panic!("unexpected target_os: {}", unknown), + }; + + let platform = apple_sdk::Platform::from_target_triple(&target) + .expect("Unknown apple platform. please report it."); #[cfg(not(feature = "__allow_empty"))] if frameworks.is_empty() { @@ -19,7 +30,7 @@ fn main() { println!("cargo:rustc-link-lib=framework={framework}"); let mut builder = - Builder::with_builtin_config(framework, "macosx").expect("sdk lookup failed"); + Builder::with_builtin_config(framework, &platform).expect("sdk lookup failed"); if let Ok(target) = std::env::var("TARGET") { builder = builder.target(target); } diff --git a/sys/build_features.inc.rs b/sys/build_features.inc.rs deleted file mode 100644 index 7d34787..0000000 --- a/sys/build_features.inc.rs +++ /dev/null @@ -1,198 +0,0 @@ -vec![ - #[cfg(feature = "AGL")] "AGL", -#[cfg(feature = "AVFAudio")] "AVFAudio", -#[cfg(feature = "AVFoundation")] "AVFoundation", -#[cfg(feature = "AVKit")] "AVKit", -#[cfg(feature = "AVRouting")] "AVRouting", -#[cfg(feature = "Accelerate")] "Accelerate", -#[cfg(feature = "Accessibility")] "Accessibility", -#[cfg(feature = "Accounts")] "Accounts", -#[cfg(feature = "AdServices")] "AdServices", -#[cfg(feature = "AdSupport")] "AdSupport", -#[cfg(feature = "AddressBook")] "AddressBook", -#[cfg(feature = "AppIntents")] "AppIntents", -#[cfg(feature = "AppKit")] "AppKit", -#[cfg(feature = "AppTrackingTransparency")] "AppTrackingTransparency", -#[cfg(feature = "AppleScriptKit")] "AppleScriptKit", -#[cfg(feature = "AppleScriptObjC")] "AppleScriptObjC", -#[cfg(feature = "ApplicationServices")] "ApplicationServices", -#[cfg(feature = "AudioToolbox")] "AudioToolbox", -#[cfg(feature = "AudioUnit")] "AudioUnit", -#[cfg(feature = "AudioVideoBridging")] "AudioVideoBridging", -#[cfg(feature = "AuthenticationServices")] "AuthenticationServices", -#[cfg(feature = "AutomaticAssessmentConfiguration")] "AutomaticAssessmentConfiguration", -#[cfg(feature = "Automator")] "Automator", -#[cfg(feature = "BackgroundAssets")] "BackgroundAssets", -#[cfg(feature = "BackgroundTasks")] "BackgroundTasks", -#[cfg(feature = "BusinessChat")] "BusinessChat", -#[cfg(feature = "CFNetwork")] "CFNetwork", -#[cfg(feature = "CalendarStore")] "CalendarStore", -#[cfg(feature = "CallKit")] "CallKit", -#[cfg(feature = "Carbon")] "Carbon", -#[cfg(feature = "ClassKit")] "ClassKit", -#[cfg(feature = "CloudKit")] "CloudKit", -#[cfg(feature = "Cocoa")] "Cocoa", -#[cfg(feature = "Collaboration")] "Collaboration", -#[cfg(feature = "ColorSync")] "ColorSync", -#[cfg(feature = "Contacts")] "Contacts", -#[cfg(feature = "ContactsUI")] "ContactsUI", -#[cfg(feature = "CoreAudio")] "CoreAudio", -#[cfg(feature = "CoreAudioKit")] "CoreAudioKit", -#[cfg(feature = "CoreBluetooth")] "CoreBluetooth", -#[cfg(feature = "CoreData")] "CoreData", -#[cfg(feature = "CoreFoundation")] "CoreFoundation", -#[cfg(feature = "CoreGraphics")] "CoreGraphics", -#[cfg(feature = "CoreHaptics")] "CoreHaptics", -#[cfg(feature = "CoreImage")] "CoreImage", -#[cfg(feature = "CoreLocation")] "CoreLocation", -#[cfg(feature = "CoreMIDI")] "CoreMIDI", -#[cfg(feature = "CoreML")] "CoreML", -#[cfg(feature = "CoreMedia")] "CoreMedia", -#[cfg(feature = "CoreMediaIO")] "CoreMediaIO", -#[cfg(feature = "CoreMotion")] "CoreMotion", -#[cfg(feature = "CoreServices")] "CoreServices", -#[cfg(feature = "CoreSpotlight")] "CoreSpotlight", -#[cfg(feature = "CoreTelephony")] "CoreTelephony", -#[cfg(feature = "CoreText")] "CoreText", -#[cfg(feature = "CoreTransferable")] "CoreTransferable", -#[cfg(feature = "CoreVideo")] "CoreVideo", -#[cfg(feature = "CoreWLAN")] "CoreWLAN", -#[cfg(feature = "CryptoTokenKit")] "CryptoTokenKit", -#[cfg(feature = "DVDPlayback")] "DVDPlayback", -#[cfg(feature = "DataDetection")] "DataDetection", -#[cfg(feature = "DeviceCheck")] "DeviceCheck", -#[cfg(feature = "DirectoryService")] "DirectoryService", -#[cfg(feature = "DiscRecording")] "DiscRecording", -#[cfg(feature = "DiscRecordingUI")] "DiscRecordingUI", -#[cfg(feature = "DiskArbitration")] "DiskArbitration", -#[cfg(feature = "EventKit")] "EventKit", -#[cfg(feature = "ExceptionHandling")] "ExceptionHandling", -#[cfg(feature = "ExecutionPolicy")] "ExecutionPolicy", -#[cfg(feature = "ExposureNotification")] "ExposureNotification", -#[cfg(feature = "ExtensionFoundation")] "ExtensionFoundation", -#[cfg(feature = "ExtensionKit")] "ExtensionKit", -#[cfg(feature = "ExternalAccessory")] "ExternalAccessory", -#[cfg(feature = "FileProvider")] "FileProvider", -#[cfg(feature = "FileProviderUI")] "FileProviderUI", -#[cfg(feature = "FinderSync")] "FinderSync", -#[cfg(feature = "ForceFeedback")] "ForceFeedback", -#[cfg(feature = "Foundation")] "Foundation", -#[cfg(feature = "GLKit")] "GLKit", -#[cfg(feature = "GLUT")] "GLUT", -#[cfg(feature = "GSS")] "GSS", -#[cfg(feature = "GameController")] "GameController", -#[cfg(feature = "GameKit")] "GameKit", -#[cfg(feature = "GameplayKit")] "GameplayKit", -#[cfg(feature = "HealthKit")] "HealthKit", -#[cfg(feature = "Hypervisor")] "Hypervisor", -#[cfg(feature = "ICADevices")] "ICADevices", -#[cfg(feature = "IMServicePlugIn")] "IMServicePlugIn", -#[cfg(feature = "IOBluetooth")] "IOBluetooth", -#[cfg(feature = "IOBluetoothUI")] "IOBluetoothUI", -#[cfg(feature = "IOKit")] "IOKit", -#[cfg(feature = "IOSurface")] "IOSurface", -#[cfg(feature = "IOUSBHost")] "IOUSBHost", -#[cfg(feature = "IdentityLookup")] "IdentityLookup", -#[cfg(feature = "ImageCaptureCore")] "ImageCaptureCore", -#[cfg(feature = "ImageIO")] "ImageIO", -#[cfg(feature = "InputMethodKit")] "InputMethodKit", -#[cfg(feature = "InstallerPlugins")] "InstallerPlugins", -#[cfg(feature = "InstantMessage")] "InstantMessage", -#[cfg(feature = "Intents")] "Intents", -#[cfg(feature = "IntentsUI")] "IntentsUI", -#[cfg(feature = "JavaNativeFoundation")] "JavaNativeFoundation", -#[cfg(feature = "JavaRuntimeSupport")] "JavaRuntimeSupport", -#[cfg(feature = "JavaScriptCore")] "JavaScriptCore", -#[cfg(feature = "Kerberos")] "Kerberos", -#[cfg(feature = "KernelManagement")] "KernelManagement", -#[cfg(feature = "LDAP")] "LDAP", -#[cfg(feature = "LatentSemanticMapping")] "LatentSemanticMapping", -#[cfg(feature = "LinkPresentation")] "LinkPresentation", -#[cfg(feature = "LocalAuthentication")] "LocalAuthentication", -#[cfg(feature = "LocalAuthenticationEmbeddedUI")] "LocalAuthenticationEmbeddedUI", -#[cfg(feature = "MLCompute")] "MLCompute", -#[cfg(feature = "MailKit")] "MailKit", -#[cfg(feature = "MapKit")] "MapKit", -#[cfg(feature = "Matter")] "Matter", -#[cfg(feature = "MediaAccessibility")] "MediaAccessibility", -#[cfg(feature = "MediaLibrary")] "MediaLibrary", -#[cfg(feature = "MediaPlayer")] "MediaPlayer", -#[cfg(feature = "MediaToolbox")] "MediaToolbox", -#[cfg(feature = "Metal")] "Metal", -#[cfg(feature = "MetalFX")] "MetalFX", -#[cfg(feature = "MetalKit")] "MetalKit", -#[cfg(feature = "MetalPerformanceShaders")] "MetalPerformanceShaders", -#[cfg(feature = "MetalPerformanceShadersGraph")] "MetalPerformanceShadersGraph", -#[cfg(feature = "MetricKit")] "MetricKit", -#[cfg(feature = "ModelIO")] "ModelIO", -#[cfg(feature = "MultipeerConnectivity")] "MultipeerConnectivity", -#[cfg(feature = "NaturalLanguage")] "NaturalLanguage", -#[cfg(feature = "NearbyInteraction")] "NearbyInteraction", -#[cfg(feature = "NetFS")] "NetFS", -#[cfg(feature = "Network")] "Network", -#[cfg(feature = "NetworkExtension")] "NetworkExtension", -#[cfg(feature = "NotificationCenter")] "NotificationCenter", -#[cfg(feature = "OSAKit")] "OSAKit", -#[cfg(feature = "OSLog")] "OSLog", -#[cfg(feature = "OpenAL")] "OpenAL", -#[cfg(feature = "OpenCL")] "OpenCL", -#[cfg(feature = "OpenDirectory")] "OpenDirectory", -#[cfg(feature = "OpenGL")] "OpenGL", -#[cfg(feature = "PCSC")] "PCSC", -#[cfg(feature = "PDFKit")] "PDFKit", -#[cfg(feature = "PHASE")] "PHASE", -#[cfg(feature = "ParavirtualizedGraphics")] "ParavirtualizedGraphics", -#[cfg(feature = "PassKit")] "PassKit", -#[cfg(feature = "PencilKit")] "PencilKit", -#[cfg(feature = "Photos")] "Photos", -#[cfg(feature = "PhotosUI")] "PhotosUI", -#[cfg(feature = "PreferencePanes")] "PreferencePanes", -#[cfg(feature = "PushKit")] "PushKit", -#[cfg(feature = "PushToTalk")] "PushToTalk", -#[cfg(feature = "Quartz")] "Quartz", -#[cfg(feature = "QuartzCore")] "QuartzCore", -#[cfg(feature = "QuickLook")] "QuickLook", -#[cfg(feature = "QuickLookThumbnailing")] "QuickLookThumbnailing", -#[cfg(feature = "QuickLookUI")] "QuickLookUI", -#[cfg(feature = "ReplayKit")] "ReplayKit", -#[cfg(feature = "SafariServices")] "SafariServices", -#[cfg(feature = "SafetyKit")] "SafetyKit", -#[cfg(feature = "SceneKit")] "SceneKit", -#[cfg(feature = "ScreenCaptureKit")] "ScreenCaptureKit", -#[cfg(feature = "ScreenSaver")] "ScreenSaver", -#[cfg(feature = "ScreenTime")] "ScreenTime", -#[cfg(feature = "ScriptingBridge")] "ScriptingBridge", -#[cfg(feature = "Security")] "Security", -#[cfg(feature = "SecurityFoundation")] "SecurityFoundation", -#[cfg(feature = "SecurityInterface")] "SecurityInterface", -#[cfg(feature = "SensorKit")] "SensorKit", -#[cfg(feature = "ServiceManagement")] "ServiceManagement", -#[cfg(feature = "SharedWithYou")] "SharedWithYou", -#[cfg(feature = "SharedWithYouCore")] "SharedWithYouCore", -#[cfg(feature = "ShazamKit")] "ShazamKit", -#[cfg(feature = "Social")] "Social", -#[cfg(feature = "SoundAnalysis")] "SoundAnalysis", -#[cfg(feature = "Speech")] "Speech", -#[cfg(feature = "SpriteKit")] "SpriteKit", -#[cfg(feature = "StoreKit")] "StoreKit", -#[cfg(feature = "SwiftUI")] "SwiftUI", -#[cfg(feature = "SyncServices")] "SyncServices", -#[cfg(feature = "SystemConfiguration")] "SystemConfiguration", -#[cfg(feature = "SystemExtensions")] "SystemExtensions", -#[cfg(feature = "TWAIN")] "TWAIN", -#[cfg(feature = "Tcl")] "Tcl", -#[cfg(feature = "ThreadNetwork")] "ThreadNetwork", -#[cfg(feature = "UniformTypeIdentifiers")] "UniformTypeIdentifiers", -#[cfg(feature = "UserNotifications")] "UserNotifications", -#[cfg(feature = "UserNotificationsUI")] "UserNotificationsUI", -#[cfg(feature = "VideoDecodeAcceleration")] "VideoDecodeAcceleration", -#[cfg(feature = "VideoSubscriberAccount")] "VideoSubscriberAccount", -#[cfg(feature = "VideoToolbox")] "VideoToolbox", -#[cfg(feature = "Virtualization")] "Virtualization", -#[cfg(feature = "Vision")] "Vision", -#[cfg(feature = "VisionKit")] "VisionKit", -#[cfg(feature = "WebKit")] "WebKit", -#[cfg(feature = "WidgetKit")] "WidgetKit", -#[cfg(feature = "iTunesLibrary")] "iTunesLibrary", -#[cfg(feature = "vmnet")] "vmnet", - ] \ No newline at end of file diff --git a/sys/configure.py b/sys/configure.py index 7da77ba..866b231 100644 --- a/sys/configure.py +++ b/sys/configure.py @@ -1,6 +1,7 @@ import os import subprocess import sys +import itertools from glob import glob from textwrap import dedent @@ -22,27 +23,40 @@ def framework_path(sdk_path): def find_framework_names(sdk_path): f_path = framework_path(sdk_path) pattern = f_path + "/*.framework" - blocklist = frozenset( - [ - # framework not found - "CoreAudioTypes", - "CoreMIDIServer", - "DeviceActivity", - "DriverKit", - "Kernel", - "QTKit", - "RealityKit", - "Ruby", - "Tk", - "vecLib", - ] - ) + if 'MacOSX' in sdk_path: + blocklist = frozenset( + [ + # framework not found + "CoreAudioTypes", + "CoreMIDIServer", + "DeviceActivity", + "DriverKit", + "Kernel", + "QTKit", + "RealityKit", + "Ruby", + "Tk", + "vecLib", + ] + ) + elif 'iPhone' in sdk_path: + blocklist = frozenset( + [ + # framework not found + "CoreAudioTypes", + "IOKit", + "RealityKit", + ] + ) + else: + raise ValueError(f"blocklist is not set for: {sdk_path}") + # print(pattern) for f_path in glob(pattern): name = os.path.basename(f_path).removesuffix(".framework") if name in blocklist: continue - has_header = os.path.isdir(f"{f_path}/Versions/Current/Headers") + has_header = os.path.isdir(f"{f_path}/Headers") if not has_header: continue if name.startswith("_"): @@ -50,7 +64,7 @@ def find_framework_names(sdk_path): yield name -def gen_lib(names): +def gen_lib(names: dict[str, list[str]]): source = dedent( f""" //! apple-sys main module @@ -64,10 +78,13 @@ def gen_lib(names): """ ) - def gen_module(name): - return f"""#[cfg(feature = "{name}")] pub mod {name} {{ include!(concat!(env!("OUT_DIR"), "/{name}.rs")); }}""" + def gen_module(os, name): + return f"""#[cfg(all(target_os = "{os}", feature = "{name}"))] pub mod {name} {{ include!(concat!(env!("OUT_DIR"), "/{name}.rs")); }}""" - source += "\n".join(gen_module(name) for name in names) + for platform, names in names.items(): + os = target_os(platform) + source += "\n".join(gen_module(os, name) for name in names) + source += "\n" return source @@ -76,21 +93,38 @@ def gen_cargo(names): DELIMITER = "# AUTO-GENERATED: DO NOT ADD ANYTHING BELOW THIS LINE" source = open("Cargo.toml", "r").read() top, _ = source.split(DELIMITER) - bottom = "\n".join(f"{name} = []" for name in names) + + unique_names = sorted(frozenset(itertools.chain(*names.values()))) + bottom = "\n".join(f"{name} = []" for name in unique_names) return f"""{top}{DELIMITER}\n{bottom}\n""" def gen_build(names): - body = "\n".join(f"""#[cfg(feature = "{name}")] "{name}",""" for name in names) - return f"""vec![ - {body} - ]""" + parts = [f' #[cfg(feature = "{name}")] "{name}",' for name in names] + body = "\n".join(parts) + return f'''vec![ +{body} +] +''' + +def target_os(platform): + MAP = { + "MacOSX": "macos", + "iPhoneOS": "ios", + "iPhoneSimulator": "ios", + } + return MAP[platform] -def main(sdk_name): + +def main(sdk_names): xcode_path = os.environ.get("XCODE_PATH") or xcode_select_path() - sdk_path = make_sdk_path(sdk_name, xcode_path) - framework_names = sorted(find_framework_names(sdk_path)) + framework_names = { + sdk_name: list( + sorted(find_framework_names(make_sdk_path(sdk_name, xcode_path))) + ) + for sdk_name in sdk_names + } with open("src/lib.rs", "w") as f: content = gen_lib(framework_names) @@ -100,27 +134,36 @@ def main(sdk_name): with open("Cargo.toml", "w") as f: f.write(content) - with open("build_features.inc.rs", "w") as f: - content = gen_build(framework_names) - f.write(content) - - with open("test_script.sh", "w") as f: - f.write( - dedent( - f""" - names="{' '.join(framework_names)}" - for name in $names; do - echo $name && cargo test --features $name &> test.$name.result && rm test.$name.result - done - """ + for platform, names in framework_names.items(): + target = target_os(platform) + with open(f"{target}.inc.rs", "w") as f: + content = gen_build(names) + f.write(content) + + for platform, names in framework_names.items(): + with open(f"test_script.{platform}.sh", "w") as f: + target = "" + command = "test" + if platform == "iPhoneOS": + target = "--target aarch64-apple-ios" + command = "build" + f.write( + dedent( + f""" + names="{' '.join(names)}" + for name in $names; do + echo $name && cargo {command} {target} --features $name &> test.{platform}.$name.result && rm test.{platform}.$name.result + done + """ + ) ) - ) - print("generated:", ",".join(framework_names)) + for platform, names in framework_names.items(): + print(f"generated {platform}:", ",".join(names)) if __name__ == "__main__": - main("MacOSX") + main(["MacOSX", "iPhoneOS"]) subprocess.run(["cargo", "fmt"]) diff --git a/sys/ios.inc.rs b/sys/ios.inc.rs new file mode 100644 index 0000000..2eac248 --- /dev/null +++ b/sys/ios.inc.rs @@ -0,0 +1,160 @@ +vec![ + #[cfg(feature = "ARKit")] "ARKit", + #[cfg(feature = "AVFAudio")] "AVFAudio", + #[cfg(feature = "AVFoundation")] "AVFoundation", + #[cfg(feature = "AVKit")] "AVKit", + #[cfg(feature = "AVRouting")] "AVRouting", + #[cfg(feature = "Accelerate")] "Accelerate", + #[cfg(feature = "Accessibility")] "Accessibility", + #[cfg(feature = "Accounts")] "Accounts", + #[cfg(feature = "ActivityKit")] "ActivityKit", + #[cfg(feature = "AdServices")] "AdServices", + #[cfg(feature = "AdSupport")] "AdSupport", + #[cfg(feature = "AddressBook")] "AddressBook", + #[cfg(feature = "AddressBookUI")] "AddressBookUI", + #[cfg(feature = "AppClip")] "AppClip", + #[cfg(feature = "AppIntents")] "AppIntents", + #[cfg(feature = "AppTrackingTransparency")] "AppTrackingTransparency", + #[cfg(feature = "AssetsLibrary")] "AssetsLibrary", + #[cfg(feature = "AudioToolbox")] "AudioToolbox", + #[cfg(feature = "AudioUnit")] "AudioUnit", + #[cfg(feature = "AuthenticationServices")] "AuthenticationServices", + #[cfg(feature = "AutomaticAssessmentConfiguration")] "AutomaticAssessmentConfiguration", + #[cfg(feature = "BackgroundAssets")] "BackgroundAssets", + #[cfg(feature = "BackgroundTasks")] "BackgroundTasks", + #[cfg(feature = "BusinessChat")] "BusinessChat", + #[cfg(feature = "CFNetwork")] "CFNetwork", + #[cfg(feature = "CallKit")] "CallKit", + #[cfg(feature = "CarPlay")] "CarPlay", + #[cfg(feature = "ClassKit")] "ClassKit", + #[cfg(feature = "ClockKit")] "ClockKit", + #[cfg(feature = "CloudKit")] "CloudKit", + #[cfg(feature = "ColorSync")] "ColorSync", + #[cfg(feature = "Contacts")] "Contacts", + #[cfg(feature = "ContactsUI")] "ContactsUI", + #[cfg(feature = "CoreAudio")] "CoreAudio", + #[cfg(feature = "CoreAudioKit")] "CoreAudioKit", + #[cfg(feature = "CoreBluetooth")] "CoreBluetooth", + #[cfg(feature = "CoreData")] "CoreData", + #[cfg(feature = "CoreFoundation")] "CoreFoundation", + #[cfg(feature = "CoreGraphics")] "CoreGraphics", + #[cfg(feature = "CoreHaptics")] "CoreHaptics", + #[cfg(feature = "CoreImage")] "CoreImage", + #[cfg(feature = "CoreLocation")] "CoreLocation", + #[cfg(feature = "CoreLocationUI")] "CoreLocationUI", + #[cfg(feature = "CoreMIDI")] "CoreMIDI", + #[cfg(feature = "CoreML")] "CoreML", + #[cfg(feature = "CoreMedia")] "CoreMedia", + #[cfg(feature = "CoreMotion")] "CoreMotion", + #[cfg(feature = "CoreNFC")] "CoreNFC", + #[cfg(feature = "CoreServices")] "CoreServices", + #[cfg(feature = "CoreSpotlight")] "CoreSpotlight", + #[cfg(feature = "CoreTelephony")] "CoreTelephony", + #[cfg(feature = "CoreText")] "CoreText", + #[cfg(feature = "CoreTransferable")] "CoreTransferable", + #[cfg(feature = "CoreVideo")] "CoreVideo", + #[cfg(feature = "CryptoTokenKit")] "CryptoTokenKit", + #[cfg(feature = "DataDetection")] "DataDetection", + #[cfg(feature = "DeviceCheck")] "DeviceCheck", + #[cfg(feature = "DeviceDiscoveryExtension")] "DeviceDiscoveryExtension", + #[cfg(feature = "EventKit")] "EventKit", + #[cfg(feature = "EventKitUI")] "EventKitUI", + #[cfg(feature = "ExposureNotification")] "ExposureNotification", + #[cfg(feature = "ExtensionFoundation")] "ExtensionFoundation", + #[cfg(feature = "ExtensionKit")] "ExtensionKit", + #[cfg(feature = "ExternalAccessory")] "ExternalAccessory", + #[cfg(feature = "FileProvider")] "FileProvider", + #[cfg(feature = "FileProviderUI")] "FileProviderUI", + #[cfg(feature = "Foundation")] "Foundation", + #[cfg(feature = "GLKit")] "GLKit", + #[cfg(feature = "GSS")] "GSS", + #[cfg(feature = "GameController")] "GameController", + #[cfg(feature = "GameKit")] "GameKit", + #[cfg(feature = "GameplayKit")] "GameplayKit", + #[cfg(feature = "HealthKit")] "HealthKit", + #[cfg(feature = "HealthKitUI")] "HealthKitUI", + #[cfg(feature = "HomeKit")] "HomeKit", + #[cfg(feature = "IOSurface")] "IOSurface", + #[cfg(feature = "IdentityLookup")] "IdentityLookup", + #[cfg(feature = "IdentityLookupUI")] "IdentityLookupUI", + #[cfg(feature = "ImageCaptureCore")] "ImageCaptureCore", + #[cfg(feature = "ImageIO")] "ImageIO", + #[cfg(feature = "Intents")] "Intents", + #[cfg(feature = "IntentsUI")] "IntentsUI", + #[cfg(feature = "JavaScriptCore")] "JavaScriptCore", + #[cfg(feature = "LinkPresentation")] "LinkPresentation", + #[cfg(feature = "LocalAuthentication")] "LocalAuthentication", + #[cfg(feature = "LocalAuthenticationEmbeddedUI")] "LocalAuthenticationEmbeddedUI", + #[cfg(feature = "MLCompute")] "MLCompute", + #[cfg(feature = "MapKit")] "MapKit", + #[cfg(feature = "Matter")] "Matter", + #[cfg(feature = "MatterSupport")] "MatterSupport", + #[cfg(feature = "MediaAccessibility")] "MediaAccessibility", + #[cfg(feature = "MediaPlayer")] "MediaPlayer", + #[cfg(feature = "MediaSetup")] "MediaSetup", + #[cfg(feature = "MediaToolbox")] "MediaToolbox", + #[cfg(feature = "MessageUI")] "MessageUI", + #[cfg(feature = "Messages")] "Messages", + #[cfg(feature = "Metal")] "Metal", + #[cfg(feature = "MetalFX")] "MetalFX", + #[cfg(feature = "MetalKit")] "MetalKit", + #[cfg(feature = "MetalPerformanceShaders")] "MetalPerformanceShaders", + #[cfg(feature = "MetalPerformanceShadersGraph")] "MetalPerformanceShadersGraph", + #[cfg(feature = "MetricKit")] "MetricKit", + #[cfg(feature = "MobileCoreServices")] "MobileCoreServices", + #[cfg(feature = "ModelIO")] "ModelIO", + #[cfg(feature = "MultipeerConnectivity")] "MultipeerConnectivity", + #[cfg(feature = "NaturalLanguage")] "NaturalLanguage", + #[cfg(feature = "NearbyInteraction")] "NearbyInteraction", + #[cfg(feature = "Network")] "Network", + #[cfg(feature = "NetworkExtension")] "NetworkExtension", + #[cfg(feature = "NewsstandKit")] "NewsstandKit", + #[cfg(feature = "NotificationCenter")] "NotificationCenter", + #[cfg(feature = "OSLog")] "OSLog", + #[cfg(feature = "OpenAL")] "OpenAL", + #[cfg(feature = "OpenGLES")] "OpenGLES", + #[cfg(feature = "PDFKit")] "PDFKit", + #[cfg(feature = "PHASE")] "PHASE", + #[cfg(feature = "PassKit")] "PassKit", + #[cfg(feature = "PencilKit")] "PencilKit", + #[cfg(feature = "Photos")] "Photos", + #[cfg(feature = "PhotosUI")] "PhotosUI", + #[cfg(feature = "ProximityReader")] "ProximityReader", + #[cfg(feature = "PushKit")] "PushKit", + #[cfg(feature = "PushToTalk")] "PushToTalk", + #[cfg(feature = "QuartzCore")] "QuartzCore", + #[cfg(feature = "QuickLook")] "QuickLook", + #[cfg(feature = "QuickLookThumbnailing")] "QuickLookThumbnailing", + #[cfg(feature = "ReplayKit")] "ReplayKit", + #[cfg(feature = "RoomPlan")] "RoomPlan", + #[cfg(feature = "SafariServices")] "SafariServices", + #[cfg(feature = "SafetyKit")] "SafetyKit", + #[cfg(feature = "SceneKit")] "SceneKit", + #[cfg(feature = "ScreenTime")] "ScreenTime", + #[cfg(feature = "Security")] "Security", + #[cfg(feature = "SensorKit")] "SensorKit", + #[cfg(feature = "SharedWithYou")] "SharedWithYou", + #[cfg(feature = "SharedWithYouCore")] "SharedWithYouCore", + #[cfg(feature = "ShazamKit")] "ShazamKit", + #[cfg(feature = "Social")] "Social", + #[cfg(feature = "SoundAnalysis")] "SoundAnalysis", + #[cfg(feature = "Speech")] "Speech", + #[cfg(feature = "SpriteKit")] "SpriteKit", + #[cfg(feature = "StoreKit")] "StoreKit", + #[cfg(feature = "SwiftUI")] "SwiftUI", + #[cfg(feature = "SystemConfiguration")] "SystemConfiguration", + #[cfg(feature = "ThreadNetwork")] "ThreadNetwork", + #[cfg(feature = "Twitter")] "Twitter", + #[cfg(feature = "UIKit")] "UIKit", + #[cfg(feature = "UniformTypeIdentifiers")] "UniformTypeIdentifiers", + #[cfg(feature = "UserNotifications")] "UserNotifications", + #[cfg(feature = "UserNotificationsUI")] "UserNotificationsUI", + #[cfg(feature = "VideoSubscriberAccount")] "VideoSubscriberAccount", + #[cfg(feature = "VideoToolbox")] "VideoToolbox", + #[cfg(feature = "Vision")] "Vision", + #[cfg(feature = "VisionKit")] "VisionKit", + #[cfg(feature = "WatchConnectivity")] "WatchConnectivity", + #[cfg(feature = "WebKit")] "WebKit", + #[cfg(feature = "WidgetKit")] "WidgetKit", + #[cfg(feature = "iAd")] "iAd", +] diff --git a/sys/macos.inc.rs b/sys/macos.inc.rs new file mode 100644 index 0000000..292a2d2 --- /dev/null +++ b/sys/macos.inc.rs @@ -0,0 +1,198 @@ +vec![ + #[cfg(feature = "AGL")] "AGL", + #[cfg(feature = "AVFAudio")] "AVFAudio", + #[cfg(feature = "AVFoundation")] "AVFoundation", + #[cfg(feature = "AVKit")] "AVKit", + #[cfg(feature = "AVRouting")] "AVRouting", + #[cfg(feature = "Accelerate")] "Accelerate", + #[cfg(feature = "Accessibility")] "Accessibility", + #[cfg(feature = "Accounts")] "Accounts", + #[cfg(feature = "AdServices")] "AdServices", + #[cfg(feature = "AdSupport")] "AdSupport", + #[cfg(feature = "AddressBook")] "AddressBook", + #[cfg(feature = "AppIntents")] "AppIntents", + #[cfg(feature = "AppKit")] "AppKit", + #[cfg(feature = "AppTrackingTransparency")] "AppTrackingTransparency", + #[cfg(feature = "AppleScriptKit")] "AppleScriptKit", + #[cfg(feature = "AppleScriptObjC")] "AppleScriptObjC", + #[cfg(feature = "ApplicationServices")] "ApplicationServices", + #[cfg(feature = "AudioToolbox")] "AudioToolbox", + #[cfg(feature = "AudioUnit")] "AudioUnit", + #[cfg(feature = "AudioVideoBridging")] "AudioVideoBridging", + #[cfg(feature = "AuthenticationServices")] "AuthenticationServices", + #[cfg(feature = "AutomaticAssessmentConfiguration")] "AutomaticAssessmentConfiguration", + #[cfg(feature = "Automator")] "Automator", + #[cfg(feature = "BackgroundAssets")] "BackgroundAssets", + #[cfg(feature = "BackgroundTasks")] "BackgroundTasks", + #[cfg(feature = "BusinessChat")] "BusinessChat", + #[cfg(feature = "CFNetwork")] "CFNetwork", + #[cfg(feature = "CalendarStore")] "CalendarStore", + #[cfg(feature = "CallKit")] "CallKit", + #[cfg(feature = "Carbon")] "Carbon", + #[cfg(feature = "ClassKit")] "ClassKit", + #[cfg(feature = "CloudKit")] "CloudKit", + #[cfg(feature = "Cocoa")] "Cocoa", + #[cfg(feature = "Collaboration")] "Collaboration", + #[cfg(feature = "ColorSync")] "ColorSync", + #[cfg(feature = "Contacts")] "Contacts", + #[cfg(feature = "ContactsUI")] "ContactsUI", + #[cfg(feature = "CoreAudio")] "CoreAudio", + #[cfg(feature = "CoreAudioKit")] "CoreAudioKit", + #[cfg(feature = "CoreBluetooth")] "CoreBluetooth", + #[cfg(feature = "CoreData")] "CoreData", + #[cfg(feature = "CoreFoundation")] "CoreFoundation", + #[cfg(feature = "CoreGraphics")] "CoreGraphics", + #[cfg(feature = "CoreHaptics")] "CoreHaptics", + #[cfg(feature = "CoreImage")] "CoreImage", + #[cfg(feature = "CoreLocation")] "CoreLocation", + #[cfg(feature = "CoreMIDI")] "CoreMIDI", + #[cfg(feature = "CoreML")] "CoreML", + #[cfg(feature = "CoreMedia")] "CoreMedia", + #[cfg(feature = "CoreMediaIO")] "CoreMediaIO", + #[cfg(feature = "CoreMotion")] "CoreMotion", + #[cfg(feature = "CoreServices")] "CoreServices", + #[cfg(feature = "CoreSpotlight")] "CoreSpotlight", + #[cfg(feature = "CoreTelephony")] "CoreTelephony", + #[cfg(feature = "CoreText")] "CoreText", + #[cfg(feature = "CoreTransferable")] "CoreTransferable", + #[cfg(feature = "CoreVideo")] "CoreVideo", + #[cfg(feature = "CoreWLAN")] "CoreWLAN", + #[cfg(feature = "CryptoTokenKit")] "CryptoTokenKit", + #[cfg(feature = "DVDPlayback")] "DVDPlayback", + #[cfg(feature = "DataDetection")] "DataDetection", + #[cfg(feature = "DeviceCheck")] "DeviceCheck", + #[cfg(feature = "DirectoryService")] "DirectoryService", + #[cfg(feature = "DiscRecording")] "DiscRecording", + #[cfg(feature = "DiscRecordingUI")] "DiscRecordingUI", + #[cfg(feature = "DiskArbitration")] "DiskArbitration", + #[cfg(feature = "EventKit")] "EventKit", + #[cfg(feature = "ExceptionHandling")] "ExceptionHandling", + #[cfg(feature = "ExecutionPolicy")] "ExecutionPolicy", + #[cfg(feature = "ExposureNotification")] "ExposureNotification", + #[cfg(feature = "ExtensionFoundation")] "ExtensionFoundation", + #[cfg(feature = "ExtensionKit")] "ExtensionKit", + #[cfg(feature = "ExternalAccessory")] "ExternalAccessory", + #[cfg(feature = "FileProvider")] "FileProvider", + #[cfg(feature = "FileProviderUI")] "FileProviderUI", + #[cfg(feature = "FinderSync")] "FinderSync", + #[cfg(feature = "ForceFeedback")] "ForceFeedback", + #[cfg(feature = "Foundation")] "Foundation", + #[cfg(feature = "GLKit")] "GLKit", + #[cfg(feature = "GLUT")] "GLUT", + #[cfg(feature = "GSS")] "GSS", + #[cfg(feature = "GameController")] "GameController", + #[cfg(feature = "GameKit")] "GameKit", + #[cfg(feature = "GameplayKit")] "GameplayKit", + #[cfg(feature = "HealthKit")] "HealthKit", + #[cfg(feature = "Hypervisor")] "Hypervisor", + #[cfg(feature = "ICADevices")] "ICADevices", + #[cfg(feature = "IMServicePlugIn")] "IMServicePlugIn", + #[cfg(feature = "IOBluetooth")] "IOBluetooth", + #[cfg(feature = "IOBluetoothUI")] "IOBluetoothUI", + #[cfg(feature = "IOKit")] "IOKit", + #[cfg(feature = "IOSurface")] "IOSurface", + #[cfg(feature = "IOUSBHost")] "IOUSBHost", + #[cfg(feature = "IdentityLookup")] "IdentityLookup", + #[cfg(feature = "ImageCaptureCore")] "ImageCaptureCore", + #[cfg(feature = "ImageIO")] "ImageIO", + #[cfg(feature = "InputMethodKit")] "InputMethodKit", + #[cfg(feature = "InstallerPlugins")] "InstallerPlugins", + #[cfg(feature = "InstantMessage")] "InstantMessage", + #[cfg(feature = "Intents")] "Intents", + #[cfg(feature = "IntentsUI")] "IntentsUI", + #[cfg(feature = "JavaNativeFoundation")] "JavaNativeFoundation", + #[cfg(feature = "JavaRuntimeSupport")] "JavaRuntimeSupport", + #[cfg(feature = "JavaScriptCore")] "JavaScriptCore", + #[cfg(feature = "Kerberos")] "Kerberos", + #[cfg(feature = "KernelManagement")] "KernelManagement", + #[cfg(feature = "LDAP")] "LDAP", + #[cfg(feature = "LatentSemanticMapping")] "LatentSemanticMapping", + #[cfg(feature = "LinkPresentation")] "LinkPresentation", + #[cfg(feature = "LocalAuthentication")] "LocalAuthentication", + #[cfg(feature = "LocalAuthenticationEmbeddedUI")] "LocalAuthenticationEmbeddedUI", + #[cfg(feature = "MLCompute")] "MLCompute", + #[cfg(feature = "MailKit")] "MailKit", + #[cfg(feature = "MapKit")] "MapKit", + #[cfg(feature = "Matter")] "Matter", + #[cfg(feature = "MediaAccessibility")] "MediaAccessibility", + #[cfg(feature = "MediaLibrary")] "MediaLibrary", + #[cfg(feature = "MediaPlayer")] "MediaPlayer", + #[cfg(feature = "MediaToolbox")] "MediaToolbox", + #[cfg(feature = "Metal")] "Metal", + #[cfg(feature = "MetalFX")] "MetalFX", + #[cfg(feature = "MetalKit")] "MetalKit", + #[cfg(feature = "MetalPerformanceShaders")] "MetalPerformanceShaders", + #[cfg(feature = "MetalPerformanceShadersGraph")] "MetalPerformanceShadersGraph", + #[cfg(feature = "MetricKit")] "MetricKit", + #[cfg(feature = "ModelIO")] "ModelIO", + #[cfg(feature = "MultipeerConnectivity")] "MultipeerConnectivity", + #[cfg(feature = "NaturalLanguage")] "NaturalLanguage", + #[cfg(feature = "NearbyInteraction")] "NearbyInteraction", + #[cfg(feature = "NetFS")] "NetFS", + #[cfg(feature = "Network")] "Network", + #[cfg(feature = "NetworkExtension")] "NetworkExtension", + #[cfg(feature = "NotificationCenter")] "NotificationCenter", + #[cfg(feature = "OSAKit")] "OSAKit", + #[cfg(feature = "OSLog")] "OSLog", + #[cfg(feature = "OpenAL")] "OpenAL", + #[cfg(feature = "OpenCL")] "OpenCL", + #[cfg(feature = "OpenDirectory")] "OpenDirectory", + #[cfg(feature = "OpenGL")] "OpenGL", + #[cfg(feature = "PCSC")] "PCSC", + #[cfg(feature = "PDFKit")] "PDFKit", + #[cfg(feature = "PHASE")] "PHASE", + #[cfg(feature = "ParavirtualizedGraphics")] "ParavirtualizedGraphics", + #[cfg(feature = "PassKit")] "PassKit", + #[cfg(feature = "PencilKit")] "PencilKit", + #[cfg(feature = "Photos")] "Photos", + #[cfg(feature = "PhotosUI")] "PhotosUI", + #[cfg(feature = "PreferencePanes")] "PreferencePanes", + #[cfg(feature = "PushKit")] "PushKit", + #[cfg(feature = "PushToTalk")] "PushToTalk", + #[cfg(feature = "Quartz")] "Quartz", + #[cfg(feature = "QuartzCore")] "QuartzCore", + #[cfg(feature = "QuickLook")] "QuickLook", + #[cfg(feature = "QuickLookThumbnailing")] "QuickLookThumbnailing", + #[cfg(feature = "QuickLookUI")] "QuickLookUI", + #[cfg(feature = "ReplayKit")] "ReplayKit", + #[cfg(feature = "SafariServices")] "SafariServices", + #[cfg(feature = "SafetyKit")] "SafetyKit", + #[cfg(feature = "SceneKit")] "SceneKit", + #[cfg(feature = "ScreenCaptureKit")] "ScreenCaptureKit", + #[cfg(feature = "ScreenSaver")] "ScreenSaver", + #[cfg(feature = "ScreenTime")] "ScreenTime", + #[cfg(feature = "ScriptingBridge")] "ScriptingBridge", + #[cfg(feature = "Security")] "Security", + #[cfg(feature = "SecurityFoundation")] "SecurityFoundation", + #[cfg(feature = "SecurityInterface")] "SecurityInterface", + #[cfg(feature = "SensorKit")] "SensorKit", + #[cfg(feature = "ServiceManagement")] "ServiceManagement", + #[cfg(feature = "SharedWithYou")] "SharedWithYou", + #[cfg(feature = "SharedWithYouCore")] "SharedWithYouCore", + #[cfg(feature = "ShazamKit")] "ShazamKit", + #[cfg(feature = "Social")] "Social", + #[cfg(feature = "SoundAnalysis")] "SoundAnalysis", + #[cfg(feature = "Speech")] "Speech", + #[cfg(feature = "SpriteKit")] "SpriteKit", + #[cfg(feature = "StoreKit")] "StoreKit", + #[cfg(feature = "SwiftUI")] "SwiftUI", + #[cfg(feature = "SyncServices")] "SyncServices", + #[cfg(feature = "SystemConfiguration")] "SystemConfiguration", + #[cfg(feature = "SystemExtensions")] "SystemExtensions", + #[cfg(feature = "TWAIN")] "TWAIN", + #[cfg(feature = "Tcl")] "Tcl", + #[cfg(feature = "ThreadNetwork")] "ThreadNetwork", + #[cfg(feature = "UniformTypeIdentifiers")] "UniformTypeIdentifiers", + #[cfg(feature = "UserNotifications")] "UserNotifications", + #[cfg(feature = "UserNotificationsUI")] "UserNotificationsUI", + #[cfg(feature = "VideoDecodeAcceleration")] "VideoDecodeAcceleration", + #[cfg(feature = "VideoSubscriberAccount")] "VideoSubscriberAccount", + #[cfg(feature = "VideoToolbox")] "VideoToolbox", + #[cfg(feature = "Virtualization")] "Virtualization", + #[cfg(feature = "Vision")] "Vision", + #[cfg(feature = "VisionKit")] "VisionKit", + #[cfg(feature = "WebKit")] "WebKit", + #[cfg(feature = "WidgetKit")] "WidgetKit", + #[cfg(feature = "iTunesLibrary")] "iTunesLibrary", + #[cfg(feature = "vmnet")] "vmnet", +] diff --git a/sys/src/lib.rs b/sys/src/lib.rs index 72e07a2..a5f06e8 100644 --- a/sys/src/lib.rs +++ b/sys/src/lib.rs @@ -6,793 +6,1431 @@ #![allow(improper_ctypes)] #![allow(non_snake_case)] -#[cfg(feature = "AGL")] +#[cfg(all(target_os = "macos", feature = "AGL"))] pub mod AGL { include!(concat!(env!("OUT_DIR"), "/AGL.rs")); } -#[cfg(feature = "AVFAudio")] +#[cfg(all(target_os = "macos", feature = "AVFAudio"))] pub mod AVFAudio { include!(concat!(env!("OUT_DIR"), "/AVFAudio.rs")); } -#[cfg(feature = "AVFoundation")] +#[cfg(all(target_os = "macos", feature = "AVFoundation"))] pub mod AVFoundation { include!(concat!(env!("OUT_DIR"), "/AVFoundation.rs")); } -#[cfg(feature = "AVKit")] +#[cfg(all(target_os = "macos", feature = "AVKit"))] pub mod AVKit { include!(concat!(env!("OUT_DIR"), "/AVKit.rs")); } -#[cfg(feature = "AVRouting")] +#[cfg(all(target_os = "macos", feature = "AVRouting"))] pub mod AVRouting { include!(concat!(env!("OUT_DIR"), "/AVRouting.rs")); } -#[cfg(feature = "Accelerate")] +#[cfg(all(target_os = "macos", feature = "Accelerate"))] pub mod Accelerate { include!(concat!(env!("OUT_DIR"), "/Accelerate.rs")); } -#[cfg(feature = "Accessibility")] +#[cfg(all(target_os = "macos", feature = "Accessibility"))] pub mod Accessibility { include!(concat!(env!("OUT_DIR"), "/Accessibility.rs")); } -#[cfg(feature = "Accounts")] +#[cfg(all(target_os = "macos", feature = "Accounts"))] pub mod Accounts { include!(concat!(env!("OUT_DIR"), "/Accounts.rs")); } -#[cfg(feature = "AdServices")] +#[cfg(all(target_os = "macos", feature = "AdServices"))] pub mod AdServices { include!(concat!(env!("OUT_DIR"), "/AdServices.rs")); } -#[cfg(feature = "AdSupport")] +#[cfg(all(target_os = "macos", feature = "AdSupport"))] pub mod AdSupport { include!(concat!(env!("OUT_DIR"), "/AdSupport.rs")); } -#[cfg(feature = "AddressBook")] +#[cfg(all(target_os = "macos", feature = "AddressBook"))] pub mod AddressBook { include!(concat!(env!("OUT_DIR"), "/AddressBook.rs")); } -#[cfg(feature = "AppIntents")] +#[cfg(all(target_os = "macos", feature = "AppIntents"))] pub mod AppIntents { include!(concat!(env!("OUT_DIR"), "/AppIntents.rs")); } -#[cfg(feature = "AppKit")] +#[cfg(all(target_os = "macos", feature = "AppKit"))] pub mod AppKit { include!(concat!(env!("OUT_DIR"), "/AppKit.rs")); } -#[cfg(feature = "AppTrackingTransparency")] +#[cfg(all(target_os = "macos", feature = "AppTrackingTransparency"))] pub mod AppTrackingTransparency { include!(concat!(env!("OUT_DIR"), "/AppTrackingTransparency.rs")); } -#[cfg(feature = "AppleScriptKit")] +#[cfg(all(target_os = "macos", feature = "AppleScriptKit"))] pub mod AppleScriptKit { include!(concat!(env!("OUT_DIR"), "/AppleScriptKit.rs")); } -#[cfg(feature = "AppleScriptObjC")] +#[cfg(all(target_os = "macos", feature = "AppleScriptObjC"))] pub mod AppleScriptObjC { include!(concat!(env!("OUT_DIR"), "/AppleScriptObjC.rs")); } -#[cfg(feature = "ApplicationServices")] +#[cfg(all(target_os = "macos", feature = "ApplicationServices"))] pub mod ApplicationServices { include!(concat!(env!("OUT_DIR"), "/ApplicationServices.rs")); } -#[cfg(feature = "AudioToolbox")] +#[cfg(all(target_os = "macos", feature = "AudioToolbox"))] pub mod AudioToolbox { include!(concat!(env!("OUT_DIR"), "/AudioToolbox.rs")); } -#[cfg(feature = "AudioUnit")] +#[cfg(all(target_os = "macos", feature = "AudioUnit"))] pub mod AudioUnit { include!(concat!(env!("OUT_DIR"), "/AudioUnit.rs")); } -#[cfg(feature = "AudioVideoBridging")] +#[cfg(all(target_os = "macos", feature = "AudioVideoBridging"))] pub mod AudioVideoBridging { include!(concat!(env!("OUT_DIR"), "/AudioVideoBridging.rs")); } -#[cfg(feature = "AuthenticationServices")] +#[cfg(all(target_os = "macos", feature = "AuthenticationServices"))] pub mod AuthenticationServices { include!(concat!(env!("OUT_DIR"), "/AuthenticationServices.rs")); } -#[cfg(feature = "AutomaticAssessmentConfiguration")] +#[cfg(all(target_os = "macos", feature = "AutomaticAssessmentConfiguration"))] pub mod AutomaticAssessmentConfiguration { include!(concat!( env!("OUT_DIR"), "/AutomaticAssessmentConfiguration.rs" )); } -#[cfg(feature = "Automator")] +#[cfg(all(target_os = "macos", feature = "Automator"))] pub mod Automator { include!(concat!(env!("OUT_DIR"), "/Automator.rs")); } -#[cfg(feature = "BackgroundAssets")] +#[cfg(all(target_os = "macos", feature = "BackgroundAssets"))] pub mod BackgroundAssets { include!(concat!(env!("OUT_DIR"), "/BackgroundAssets.rs")); } -#[cfg(feature = "BackgroundTasks")] +#[cfg(all(target_os = "macos", feature = "BackgroundTasks"))] pub mod BackgroundTasks { include!(concat!(env!("OUT_DIR"), "/BackgroundTasks.rs")); } -#[cfg(feature = "BusinessChat")] +#[cfg(all(target_os = "macos", feature = "BusinessChat"))] pub mod BusinessChat { include!(concat!(env!("OUT_DIR"), "/BusinessChat.rs")); } -#[cfg(feature = "CFNetwork")] +#[cfg(all(target_os = "macos", feature = "CFNetwork"))] pub mod CFNetwork { include!(concat!(env!("OUT_DIR"), "/CFNetwork.rs")); } -#[cfg(feature = "CalendarStore")] +#[cfg(all(target_os = "macos", feature = "CalendarStore"))] pub mod CalendarStore { include!(concat!(env!("OUT_DIR"), "/CalendarStore.rs")); } -#[cfg(feature = "CallKit")] +#[cfg(all(target_os = "macos", feature = "CallKit"))] pub mod CallKit { include!(concat!(env!("OUT_DIR"), "/CallKit.rs")); } -#[cfg(feature = "Carbon")] +#[cfg(all(target_os = "macos", feature = "Carbon"))] pub mod Carbon { include!(concat!(env!("OUT_DIR"), "/Carbon.rs")); } -#[cfg(feature = "ClassKit")] +#[cfg(all(target_os = "macos", feature = "ClassKit"))] pub mod ClassKit { include!(concat!(env!("OUT_DIR"), "/ClassKit.rs")); } -#[cfg(feature = "CloudKit")] +#[cfg(all(target_os = "macos", feature = "CloudKit"))] pub mod CloudKit { include!(concat!(env!("OUT_DIR"), "/CloudKit.rs")); } -#[cfg(feature = "Cocoa")] +#[cfg(all(target_os = "macos", feature = "Cocoa"))] pub mod Cocoa { include!(concat!(env!("OUT_DIR"), "/Cocoa.rs")); } -#[cfg(feature = "Collaboration")] +#[cfg(all(target_os = "macos", feature = "Collaboration"))] pub mod Collaboration { include!(concat!(env!("OUT_DIR"), "/Collaboration.rs")); } -#[cfg(feature = "ColorSync")] +#[cfg(all(target_os = "macos", feature = "ColorSync"))] pub mod ColorSync { include!(concat!(env!("OUT_DIR"), "/ColorSync.rs")); } -#[cfg(feature = "Contacts")] +#[cfg(all(target_os = "macos", feature = "Contacts"))] pub mod Contacts { include!(concat!(env!("OUT_DIR"), "/Contacts.rs")); } -#[cfg(feature = "ContactsUI")] +#[cfg(all(target_os = "macos", feature = "ContactsUI"))] pub mod ContactsUI { include!(concat!(env!("OUT_DIR"), "/ContactsUI.rs")); } -#[cfg(feature = "CoreAudio")] +#[cfg(all(target_os = "macos", feature = "CoreAudio"))] pub mod CoreAudio { include!(concat!(env!("OUT_DIR"), "/CoreAudio.rs")); } -#[cfg(feature = "CoreAudioKit")] +#[cfg(all(target_os = "macos", feature = "CoreAudioKit"))] pub mod CoreAudioKit { include!(concat!(env!("OUT_DIR"), "/CoreAudioKit.rs")); } -#[cfg(feature = "CoreBluetooth")] +#[cfg(all(target_os = "macos", feature = "CoreBluetooth"))] pub mod CoreBluetooth { include!(concat!(env!("OUT_DIR"), "/CoreBluetooth.rs")); } -#[cfg(feature = "CoreData")] +#[cfg(all(target_os = "macos", feature = "CoreData"))] pub mod CoreData { include!(concat!(env!("OUT_DIR"), "/CoreData.rs")); } -#[cfg(feature = "CoreFoundation")] +#[cfg(all(target_os = "macos", feature = "CoreFoundation"))] pub mod CoreFoundation { include!(concat!(env!("OUT_DIR"), "/CoreFoundation.rs")); } -#[cfg(feature = "CoreGraphics")] +#[cfg(all(target_os = "macos", feature = "CoreGraphics"))] pub mod CoreGraphics { include!(concat!(env!("OUT_DIR"), "/CoreGraphics.rs")); } -#[cfg(feature = "CoreHaptics")] +#[cfg(all(target_os = "macos", feature = "CoreHaptics"))] pub mod CoreHaptics { include!(concat!(env!("OUT_DIR"), "/CoreHaptics.rs")); } -#[cfg(feature = "CoreImage")] +#[cfg(all(target_os = "macos", feature = "CoreImage"))] pub mod CoreImage { include!(concat!(env!("OUT_DIR"), "/CoreImage.rs")); } -#[cfg(feature = "CoreLocation")] +#[cfg(all(target_os = "macos", feature = "CoreLocation"))] pub mod CoreLocation { include!(concat!(env!("OUT_DIR"), "/CoreLocation.rs")); } -#[cfg(feature = "CoreMIDI")] +#[cfg(all(target_os = "macos", feature = "CoreMIDI"))] pub mod CoreMIDI { include!(concat!(env!("OUT_DIR"), "/CoreMIDI.rs")); } -#[cfg(feature = "CoreML")] +#[cfg(all(target_os = "macos", feature = "CoreML"))] pub mod CoreML { include!(concat!(env!("OUT_DIR"), "/CoreML.rs")); } -#[cfg(feature = "CoreMedia")] +#[cfg(all(target_os = "macos", feature = "CoreMedia"))] pub mod CoreMedia { include!(concat!(env!("OUT_DIR"), "/CoreMedia.rs")); } -#[cfg(feature = "CoreMediaIO")] +#[cfg(all(target_os = "macos", feature = "CoreMediaIO"))] pub mod CoreMediaIO { include!(concat!(env!("OUT_DIR"), "/CoreMediaIO.rs")); } -#[cfg(feature = "CoreMotion")] +#[cfg(all(target_os = "macos", feature = "CoreMotion"))] pub mod CoreMotion { include!(concat!(env!("OUT_DIR"), "/CoreMotion.rs")); } -#[cfg(feature = "CoreServices")] +#[cfg(all(target_os = "macos", feature = "CoreServices"))] pub mod CoreServices { include!(concat!(env!("OUT_DIR"), "/CoreServices.rs")); } -#[cfg(feature = "CoreSpotlight")] +#[cfg(all(target_os = "macos", feature = "CoreSpotlight"))] pub mod CoreSpotlight { include!(concat!(env!("OUT_DIR"), "/CoreSpotlight.rs")); } -#[cfg(feature = "CoreTelephony")] +#[cfg(all(target_os = "macos", feature = "CoreTelephony"))] pub mod CoreTelephony { include!(concat!(env!("OUT_DIR"), "/CoreTelephony.rs")); } -#[cfg(feature = "CoreText")] +#[cfg(all(target_os = "macos", feature = "CoreText"))] pub mod CoreText { include!(concat!(env!("OUT_DIR"), "/CoreText.rs")); } -#[cfg(feature = "CoreTransferable")] +#[cfg(all(target_os = "macos", feature = "CoreTransferable"))] pub mod CoreTransferable { include!(concat!(env!("OUT_DIR"), "/CoreTransferable.rs")); } -#[cfg(feature = "CoreVideo")] +#[cfg(all(target_os = "macos", feature = "CoreVideo"))] pub mod CoreVideo { include!(concat!(env!("OUT_DIR"), "/CoreVideo.rs")); } -#[cfg(feature = "CoreWLAN")] +#[cfg(all(target_os = "macos", feature = "CoreWLAN"))] pub mod CoreWLAN { include!(concat!(env!("OUT_DIR"), "/CoreWLAN.rs")); } -#[cfg(feature = "CryptoTokenKit")] +#[cfg(all(target_os = "macos", feature = "CryptoTokenKit"))] pub mod CryptoTokenKit { include!(concat!(env!("OUT_DIR"), "/CryptoTokenKit.rs")); } -#[cfg(feature = "DVDPlayback")] +#[cfg(all(target_os = "macos", feature = "DVDPlayback"))] pub mod DVDPlayback { include!(concat!(env!("OUT_DIR"), "/DVDPlayback.rs")); } -#[cfg(feature = "DataDetection")] +#[cfg(all(target_os = "macos", feature = "DataDetection"))] pub mod DataDetection { include!(concat!(env!("OUT_DIR"), "/DataDetection.rs")); } -#[cfg(feature = "DeviceCheck")] +#[cfg(all(target_os = "macos", feature = "DeviceCheck"))] pub mod DeviceCheck { include!(concat!(env!("OUT_DIR"), "/DeviceCheck.rs")); } -#[cfg(feature = "DirectoryService")] +#[cfg(all(target_os = "macos", feature = "DirectoryService"))] pub mod DirectoryService { include!(concat!(env!("OUT_DIR"), "/DirectoryService.rs")); } -#[cfg(feature = "DiscRecording")] +#[cfg(all(target_os = "macos", feature = "DiscRecording"))] pub mod DiscRecording { include!(concat!(env!("OUT_DIR"), "/DiscRecording.rs")); } -#[cfg(feature = "DiscRecordingUI")] +#[cfg(all(target_os = "macos", feature = "DiscRecordingUI"))] pub mod DiscRecordingUI { include!(concat!(env!("OUT_DIR"), "/DiscRecordingUI.rs")); } -#[cfg(feature = "DiskArbitration")] +#[cfg(all(target_os = "macos", feature = "DiskArbitration"))] pub mod DiskArbitration { include!(concat!(env!("OUT_DIR"), "/DiskArbitration.rs")); } -#[cfg(feature = "EventKit")] +#[cfg(all(target_os = "macos", feature = "EventKit"))] pub mod EventKit { include!(concat!(env!("OUT_DIR"), "/EventKit.rs")); } -#[cfg(feature = "ExceptionHandling")] +#[cfg(all(target_os = "macos", feature = "ExceptionHandling"))] pub mod ExceptionHandling { include!(concat!(env!("OUT_DIR"), "/ExceptionHandling.rs")); } -#[cfg(feature = "ExecutionPolicy")] +#[cfg(all(target_os = "macos", feature = "ExecutionPolicy"))] pub mod ExecutionPolicy { include!(concat!(env!("OUT_DIR"), "/ExecutionPolicy.rs")); } -#[cfg(feature = "ExposureNotification")] +#[cfg(all(target_os = "macos", feature = "ExposureNotification"))] pub mod ExposureNotification { include!(concat!(env!("OUT_DIR"), "/ExposureNotification.rs")); } -#[cfg(feature = "ExtensionFoundation")] +#[cfg(all(target_os = "macos", feature = "ExtensionFoundation"))] pub mod ExtensionFoundation { include!(concat!(env!("OUT_DIR"), "/ExtensionFoundation.rs")); } -#[cfg(feature = "ExtensionKit")] +#[cfg(all(target_os = "macos", feature = "ExtensionKit"))] pub mod ExtensionKit { include!(concat!(env!("OUT_DIR"), "/ExtensionKit.rs")); } -#[cfg(feature = "ExternalAccessory")] +#[cfg(all(target_os = "macos", feature = "ExternalAccessory"))] pub mod ExternalAccessory { include!(concat!(env!("OUT_DIR"), "/ExternalAccessory.rs")); } -#[cfg(feature = "FileProvider")] +#[cfg(all(target_os = "macos", feature = "FileProvider"))] pub mod FileProvider { include!(concat!(env!("OUT_DIR"), "/FileProvider.rs")); } -#[cfg(feature = "FileProviderUI")] +#[cfg(all(target_os = "macos", feature = "FileProviderUI"))] pub mod FileProviderUI { include!(concat!(env!("OUT_DIR"), "/FileProviderUI.rs")); } -#[cfg(feature = "FinderSync")] +#[cfg(all(target_os = "macos", feature = "FinderSync"))] pub mod FinderSync { include!(concat!(env!("OUT_DIR"), "/FinderSync.rs")); } -#[cfg(feature = "ForceFeedback")] +#[cfg(all(target_os = "macos", feature = "ForceFeedback"))] pub mod ForceFeedback { include!(concat!(env!("OUT_DIR"), "/ForceFeedback.rs")); } -#[cfg(feature = "Foundation")] +#[cfg(all(target_os = "macos", feature = "Foundation"))] pub mod Foundation { include!(concat!(env!("OUT_DIR"), "/Foundation.rs")); } -#[cfg(feature = "GLKit")] +#[cfg(all(target_os = "macos", feature = "GLKit"))] pub mod GLKit { include!(concat!(env!("OUT_DIR"), "/GLKit.rs")); } -#[cfg(feature = "GLUT")] +#[cfg(all(target_os = "macos", feature = "GLUT"))] pub mod GLUT { include!(concat!(env!("OUT_DIR"), "/GLUT.rs")); } -#[cfg(feature = "GSS")] +#[cfg(all(target_os = "macos", feature = "GSS"))] pub mod GSS { include!(concat!(env!("OUT_DIR"), "/GSS.rs")); } -#[cfg(feature = "GameController")] +#[cfg(all(target_os = "macos", feature = "GameController"))] pub mod GameController { include!(concat!(env!("OUT_DIR"), "/GameController.rs")); } -#[cfg(feature = "GameKit")] +#[cfg(all(target_os = "macos", feature = "GameKit"))] pub mod GameKit { include!(concat!(env!("OUT_DIR"), "/GameKit.rs")); } -#[cfg(feature = "GameplayKit")] +#[cfg(all(target_os = "macos", feature = "GameplayKit"))] pub mod GameplayKit { include!(concat!(env!("OUT_DIR"), "/GameplayKit.rs")); } -#[cfg(feature = "HealthKit")] +#[cfg(all(target_os = "macos", feature = "HealthKit"))] pub mod HealthKit { include!(concat!(env!("OUT_DIR"), "/HealthKit.rs")); } -#[cfg(feature = "Hypervisor")] +#[cfg(all(target_os = "macos", feature = "Hypervisor"))] pub mod Hypervisor { include!(concat!(env!("OUT_DIR"), "/Hypervisor.rs")); } -#[cfg(feature = "ICADevices")] +#[cfg(all(target_os = "macos", feature = "ICADevices"))] pub mod ICADevices { include!(concat!(env!("OUT_DIR"), "/ICADevices.rs")); } -#[cfg(feature = "IMServicePlugIn")] +#[cfg(all(target_os = "macos", feature = "IMServicePlugIn"))] pub mod IMServicePlugIn { include!(concat!(env!("OUT_DIR"), "/IMServicePlugIn.rs")); } -#[cfg(feature = "IOBluetooth")] +#[cfg(all(target_os = "macos", feature = "IOBluetooth"))] pub mod IOBluetooth { include!(concat!(env!("OUT_DIR"), "/IOBluetooth.rs")); } -#[cfg(feature = "IOBluetoothUI")] +#[cfg(all(target_os = "macos", feature = "IOBluetoothUI"))] pub mod IOBluetoothUI { include!(concat!(env!("OUT_DIR"), "/IOBluetoothUI.rs")); } -#[cfg(feature = "IOKit")] +#[cfg(all(target_os = "macos", feature = "IOKit"))] pub mod IOKit { include!(concat!(env!("OUT_DIR"), "/IOKit.rs")); } -#[cfg(feature = "IOSurface")] +#[cfg(all(target_os = "macos", feature = "IOSurface"))] pub mod IOSurface { include!(concat!(env!("OUT_DIR"), "/IOSurface.rs")); } -#[cfg(feature = "IOUSBHost")] +#[cfg(all(target_os = "macos", feature = "IOUSBHost"))] pub mod IOUSBHost { include!(concat!(env!("OUT_DIR"), "/IOUSBHost.rs")); } -#[cfg(feature = "IdentityLookup")] +#[cfg(all(target_os = "macos", feature = "IdentityLookup"))] pub mod IdentityLookup { include!(concat!(env!("OUT_DIR"), "/IdentityLookup.rs")); } -#[cfg(feature = "ImageCaptureCore")] +#[cfg(all(target_os = "macos", feature = "ImageCaptureCore"))] pub mod ImageCaptureCore { include!(concat!(env!("OUT_DIR"), "/ImageCaptureCore.rs")); } -#[cfg(feature = "ImageIO")] +#[cfg(all(target_os = "macos", feature = "ImageIO"))] pub mod ImageIO { include!(concat!(env!("OUT_DIR"), "/ImageIO.rs")); } -#[cfg(feature = "InputMethodKit")] +#[cfg(all(target_os = "macos", feature = "InputMethodKit"))] pub mod InputMethodKit { include!(concat!(env!("OUT_DIR"), "/InputMethodKit.rs")); } -#[cfg(feature = "InstallerPlugins")] +#[cfg(all(target_os = "macos", feature = "InstallerPlugins"))] pub mod InstallerPlugins { include!(concat!(env!("OUT_DIR"), "/InstallerPlugins.rs")); } -#[cfg(feature = "InstantMessage")] +#[cfg(all(target_os = "macos", feature = "InstantMessage"))] pub mod InstantMessage { include!(concat!(env!("OUT_DIR"), "/InstantMessage.rs")); } -#[cfg(feature = "Intents")] +#[cfg(all(target_os = "macos", feature = "Intents"))] pub mod Intents { include!(concat!(env!("OUT_DIR"), "/Intents.rs")); } -#[cfg(feature = "IntentsUI")] +#[cfg(all(target_os = "macos", feature = "IntentsUI"))] pub mod IntentsUI { include!(concat!(env!("OUT_DIR"), "/IntentsUI.rs")); } -#[cfg(feature = "JavaNativeFoundation")] +#[cfg(all(target_os = "macos", feature = "JavaNativeFoundation"))] pub mod JavaNativeFoundation { include!(concat!(env!("OUT_DIR"), "/JavaNativeFoundation.rs")); } -#[cfg(feature = "JavaRuntimeSupport")] +#[cfg(all(target_os = "macos", feature = "JavaRuntimeSupport"))] pub mod JavaRuntimeSupport { include!(concat!(env!("OUT_DIR"), "/JavaRuntimeSupport.rs")); } -#[cfg(feature = "JavaScriptCore")] +#[cfg(all(target_os = "macos", feature = "JavaScriptCore"))] pub mod JavaScriptCore { include!(concat!(env!("OUT_DIR"), "/JavaScriptCore.rs")); } -#[cfg(feature = "Kerberos")] +#[cfg(all(target_os = "macos", feature = "Kerberos"))] pub mod Kerberos { include!(concat!(env!("OUT_DIR"), "/Kerberos.rs")); } -#[cfg(feature = "KernelManagement")] +#[cfg(all(target_os = "macos", feature = "KernelManagement"))] pub mod KernelManagement { include!(concat!(env!("OUT_DIR"), "/KernelManagement.rs")); } -#[cfg(feature = "LDAP")] +#[cfg(all(target_os = "macos", feature = "LDAP"))] pub mod LDAP { include!(concat!(env!("OUT_DIR"), "/LDAP.rs")); } -#[cfg(feature = "LatentSemanticMapping")] +#[cfg(all(target_os = "macos", feature = "LatentSemanticMapping"))] pub mod LatentSemanticMapping { include!(concat!(env!("OUT_DIR"), "/LatentSemanticMapping.rs")); } -#[cfg(feature = "LinkPresentation")] +#[cfg(all(target_os = "macos", feature = "LinkPresentation"))] pub mod LinkPresentation { include!(concat!(env!("OUT_DIR"), "/LinkPresentation.rs")); } -#[cfg(feature = "LocalAuthentication")] +#[cfg(all(target_os = "macos", feature = "LocalAuthentication"))] pub mod LocalAuthentication { include!(concat!(env!("OUT_DIR"), "/LocalAuthentication.rs")); } -#[cfg(feature = "LocalAuthenticationEmbeddedUI")] +#[cfg(all(target_os = "macos", feature = "LocalAuthenticationEmbeddedUI"))] pub mod LocalAuthenticationEmbeddedUI { include!(concat!( env!("OUT_DIR"), "/LocalAuthenticationEmbeddedUI.rs" )); } -#[cfg(feature = "MLCompute")] +#[cfg(all(target_os = "macos", feature = "MLCompute"))] pub mod MLCompute { include!(concat!(env!("OUT_DIR"), "/MLCompute.rs")); } -#[cfg(feature = "MailKit")] +#[cfg(all(target_os = "macos", feature = "MailKit"))] pub mod MailKit { include!(concat!(env!("OUT_DIR"), "/MailKit.rs")); } -#[cfg(feature = "MapKit")] +#[cfg(all(target_os = "macos", feature = "MapKit"))] pub mod MapKit { include!(concat!(env!("OUT_DIR"), "/MapKit.rs")); } -#[cfg(feature = "Matter")] +#[cfg(all(target_os = "macos", feature = "Matter"))] pub mod Matter { include!(concat!(env!("OUT_DIR"), "/Matter.rs")); } -#[cfg(feature = "MediaAccessibility")] +#[cfg(all(target_os = "macos", feature = "MediaAccessibility"))] pub mod MediaAccessibility { include!(concat!(env!("OUT_DIR"), "/MediaAccessibility.rs")); } -#[cfg(feature = "MediaLibrary")] +#[cfg(all(target_os = "macos", feature = "MediaLibrary"))] pub mod MediaLibrary { include!(concat!(env!("OUT_DIR"), "/MediaLibrary.rs")); } -#[cfg(feature = "MediaPlayer")] +#[cfg(all(target_os = "macos", feature = "MediaPlayer"))] pub mod MediaPlayer { include!(concat!(env!("OUT_DIR"), "/MediaPlayer.rs")); } -#[cfg(feature = "MediaToolbox")] +#[cfg(all(target_os = "macos", feature = "MediaToolbox"))] pub mod MediaToolbox { include!(concat!(env!("OUT_DIR"), "/MediaToolbox.rs")); } -#[cfg(feature = "Metal")] +#[cfg(all(target_os = "macos", feature = "Metal"))] pub mod Metal { include!(concat!(env!("OUT_DIR"), "/Metal.rs")); } -#[cfg(feature = "MetalFX")] +#[cfg(all(target_os = "macos", feature = "MetalFX"))] pub mod MetalFX { include!(concat!(env!("OUT_DIR"), "/MetalFX.rs")); } -#[cfg(feature = "MetalKit")] +#[cfg(all(target_os = "macos", feature = "MetalKit"))] pub mod MetalKit { include!(concat!(env!("OUT_DIR"), "/MetalKit.rs")); } -#[cfg(feature = "MetalPerformanceShaders")] +#[cfg(all(target_os = "macos", feature = "MetalPerformanceShaders"))] pub mod MetalPerformanceShaders { include!(concat!(env!("OUT_DIR"), "/MetalPerformanceShaders.rs")); } -#[cfg(feature = "MetalPerformanceShadersGraph")] +#[cfg(all(target_os = "macos", feature = "MetalPerformanceShadersGraph"))] pub mod MetalPerformanceShadersGraph { include!(concat!(env!("OUT_DIR"), "/MetalPerformanceShadersGraph.rs")); } -#[cfg(feature = "MetricKit")] +#[cfg(all(target_os = "macos", feature = "MetricKit"))] pub mod MetricKit { include!(concat!(env!("OUT_DIR"), "/MetricKit.rs")); } -#[cfg(feature = "ModelIO")] +#[cfg(all(target_os = "macos", feature = "ModelIO"))] pub mod ModelIO { include!(concat!(env!("OUT_DIR"), "/ModelIO.rs")); } -#[cfg(feature = "MultipeerConnectivity")] +#[cfg(all(target_os = "macos", feature = "MultipeerConnectivity"))] pub mod MultipeerConnectivity { include!(concat!(env!("OUT_DIR"), "/MultipeerConnectivity.rs")); } -#[cfg(feature = "NaturalLanguage")] +#[cfg(all(target_os = "macos", feature = "NaturalLanguage"))] pub mod NaturalLanguage { include!(concat!(env!("OUT_DIR"), "/NaturalLanguage.rs")); } -#[cfg(feature = "NearbyInteraction")] +#[cfg(all(target_os = "macos", feature = "NearbyInteraction"))] pub mod NearbyInteraction { include!(concat!(env!("OUT_DIR"), "/NearbyInteraction.rs")); } -#[cfg(feature = "NetFS")] +#[cfg(all(target_os = "macos", feature = "NetFS"))] pub mod NetFS { include!(concat!(env!("OUT_DIR"), "/NetFS.rs")); } -#[cfg(feature = "Network")] +#[cfg(all(target_os = "macos", feature = "Network"))] pub mod Network { include!(concat!(env!("OUT_DIR"), "/Network.rs")); } -#[cfg(feature = "NetworkExtension")] +#[cfg(all(target_os = "macos", feature = "NetworkExtension"))] pub mod NetworkExtension { include!(concat!(env!("OUT_DIR"), "/NetworkExtension.rs")); } -#[cfg(feature = "NotificationCenter")] +#[cfg(all(target_os = "macos", feature = "NotificationCenter"))] pub mod NotificationCenter { include!(concat!(env!("OUT_DIR"), "/NotificationCenter.rs")); } -#[cfg(feature = "OSAKit")] +#[cfg(all(target_os = "macos", feature = "OSAKit"))] pub mod OSAKit { include!(concat!(env!("OUT_DIR"), "/OSAKit.rs")); } -#[cfg(feature = "OSLog")] +#[cfg(all(target_os = "macos", feature = "OSLog"))] pub mod OSLog { include!(concat!(env!("OUT_DIR"), "/OSLog.rs")); } -#[cfg(feature = "OpenAL")] +#[cfg(all(target_os = "macos", feature = "OpenAL"))] pub mod OpenAL { include!(concat!(env!("OUT_DIR"), "/OpenAL.rs")); } -#[cfg(feature = "OpenCL")] +#[cfg(all(target_os = "macos", feature = "OpenCL"))] pub mod OpenCL { include!(concat!(env!("OUT_DIR"), "/OpenCL.rs")); } -#[cfg(feature = "OpenDirectory")] +#[cfg(all(target_os = "macos", feature = "OpenDirectory"))] pub mod OpenDirectory { include!(concat!(env!("OUT_DIR"), "/OpenDirectory.rs")); } -#[cfg(feature = "OpenGL")] +#[cfg(all(target_os = "macos", feature = "OpenGL"))] pub mod OpenGL { include!(concat!(env!("OUT_DIR"), "/OpenGL.rs")); } -#[cfg(feature = "PCSC")] +#[cfg(all(target_os = "macos", feature = "PCSC"))] pub mod PCSC { include!(concat!(env!("OUT_DIR"), "/PCSC.rs")); } -#[cfg(feature = "PDFKit")] +#[cfg(all(target_os = "macos", feature = "PDFKit"))] pub mod PDFKit { include!(concat!(env!("OUT_DIR"), "/PDFKit.rs")); } -#[cfg(feature = "PHASE")] +#[cfg(all(target_os = "macos", feature = "PHASE"))] pub mod PHASE { include!(concat!(env!("OUT_DIR"), "/PHASE.rs")); } -#[cfg(feature = "ParavirtualizedGraphics")] +#[cfg(all(target_os = "macos", feature = "ParavirtualizedGraphics"))] pub mod ParavirtualizedGraphics { include!(concat!(env!("OUT_DIR"), "/ParavirtualizedGraphics.rs")); } -#[cfg(feature = "PassKit")] +#[cfg(all(target_os = "macos", feature = "PassKit"))] pub mod PassKit { include!(concat!(env!("OUT_DIR"), "/PassKit.rs")); } -#[cfg(feature = "PencilKit")] +#[cfg(all(target_os = "macos", feature = "PencilKit"))] pub mod PencilKit { include!(concat!(env!("OUT_DIR"), "/PencilKit.rs")); } -#[cfg(feature = "Photos")] +#[cfg(all(target_os = "macos", feature = "Photos"))] pub mod Photos { include!(concat!(env!("OUT_DIR"), "/Photos.rs")); } -#[cfg(feature = "PhotosUI")] +#[cfg(all(target_os = "macos", feature = "PhotosUI"))] pub mod PhotosUI { include!(concat!(env!("OUT_DIR"), "/PhotosUI.rs")); } -#[cfg(feature = "PreferencePanes")] +#[cfg(all(target_os = "macos", feature = "PreferencePanes"))] pub mod PreferencePanes { include!(concat!(env!("OUT_DIR"), "/PreferencePanes.rs")); } -#[cfg(feature = "PushKit")] +#[cfg(all(target_os = "macos", feature = "PushKit"))] pub mod PushKit { include!(concat!(env!("OUT_DIR"), "/PushKit.rs")); } -#[cfg(feature = "PushToTalk")] +#[cfg(all(target_os = "macos", feature = "PushToTalk"))] pub mod PushToTalk { include!(concat!(env!("OUT_DIR"), "/PushToTalk.rs")); } -#[cfg(feature = "Quartz")] +#[cfg(all(target_os = "macos", feature = "Quartz"))] pub mod Quartz { include!(concat!(env!("OUT_DIR"), "/Quartz.rs")); } -#[cfg(feature = "QuartzCore")] +#[cfg(all(target_os = "macos", feature = "QuartzCore"))] pub mod QuartzCore { include!(concat!(env!("OUT_DIR"), "/QuartzCore.rs")); } -#[cfg(feature = "QuickLook")] +#[cfg(all(target_os = "macos", feature = "QuickLook"))] pub mod QuickLook { include!(concat!(env!("OUT_DIR"), "/QuickLook.rs")); } -#[cfg(feature = "QuickLookThumbnailing")] +#[cfg(all(target_os = "macos", feature = "QuickLookThumbnailing"))] pub mod QuickLookThumbnailing { include!(concat!(env!("OUT_DIR"), "/QuickLookThumbnailing.rs")); } -#[cfg(feature = "QuickLookUI")] +#[cfg(all(target_os = "macos", feature = "QuickLookUI"))] pub mod QuickLookUI { include!(concat!(env!("OUT_DIR"), "/QuickLookUI.rs")); } -#[cfg(feature = "ReplayKit")] +#[cfg(all(target_os = "macos", feature = "ReplayKit"))] pub mod ReplayKit { include!(concat!(env!("OUT_DIR"), "/ReplayKit.rs")); } -#[cfg(feature = "SafariServices")] +#[cfg(all(target_os = "macos", feature = "SafariServices"))] pub mod SafariServices { include!(concat!(env!("OUT_DIR"), "/SafariServices.rs")); } -#[cfg(feature = "SafetyKit")] +#[cfg(all(target_os = "macos", feature = "SafetyKit"))] pub mod SafetyKit { include!(concat!(env!("OUT_DIR"), "/SafetyKit.rs")); } -#[cfg(feature = "SceneKit")] +#[cfg(all(target_os = "macos", feature = "SceneKit"))] pub mod SceneKit { include!(concat!(env!("OUT_DIR"), "/SceneKit.rs")); } -#[cfg(feature = "ScreenCaptureKit")] +#[cfg(all(target_os = "macos", feature = "ScreenCaptureKit"))] pub mod ScreenCaptureKit { include!(concat!(env!("OUT_DIR"), "/ScreenCaptureKit.rs")); } -#[cfg(feature = "ScreenSaver")] +#[cfg(all(target_os = "macos", feature = "ScreenSaver"))] pub mod ScreenSaver { include!(concat!(env!("OUT_DIR"), "/ScreenSaver.rs")); } -#[cfg(feature = "ScreenTime")] +#[cfg(all(target_os = "macos", feature = "ScreenTime"))] pub mod ScreenTime { include!(concat!(env!("OUT_DIR"), "/ScreenTime.rs")); } -#[cfg(feature = "ScriptingBridge")] +#[cfg(all(target_os = "macos", feature = "ScriptingBridge"))] pub mod ScriptingBridge { include!(concat!(env!("OUT_DIR"), "/ScriptingBridge.rs")); } -#[cfg(feature = "Security")] +#[cfg(all(target_os = "macos", feature = "Security"))] pub mod Security { include!(concat!(env!("OUT_DIR"), "/Security.rs")); } -#[cfg(feature = "SecurityFoundation")] +#[cfg(all(target_os = "macos", feature = "SecurityFoundation"))] pub mod SecurityFoundation { include!(concat!(env!("OUT_DIR"), "/SecurityFoundation.rs")); } -#[cfg(feature = "SecurityInterface")] +#[cfg(all(target_os = "macos", feature = "SecurityInterface"))] pub mod SecurityInterface { include!(concat!(env!("OUT_DIR"), "/SecurityInterface.rs")); } -#[cfg(feature = "SensorKit")] +#[cfg(all(target_os = "macos", feature = "SensorKit"))] pub mod SensorKit { include!(concat!(env!("OUT_DIR"), "/SensorKit.rs")); } -#[cfg(feature = "ServiceManagement")] +#[cfg(all(target_os = "macos", feature = "ServiceManagement"))] pub mod ServiceManagement { include!(concat!(env!("OUT_DIR"), "/ServiceManagement.rs")); } -#[cfg(feature = "SharedWithYou")] +#[cfg(all(target_os = "macos", feature = "SharedWithYou"))] pub mod SharedWithYou { include!(concat!(env!("OUT_DIR"), "/SharedWithYou.rs")); } -#[cfg(feature = "SharedWithYouCore")] +#[cfg(all(target_os = "macos", feature = "SharedWithYouCore"))] pub mod SharedWithYouCore { include!(concat!(env!("OUT_DIR"), "/SharedWithYouCore.rs")); } -#[cfg(feature = "ShazamKit")] +#[cfg(all(target_os = "macos", feature = "ShazamKit"))] pub mod ShazamKit { include!(concat!(env!("OUT_DIR"), "/ShazamKit.rs")); } -#[cfg(feature = "Social")] +#[cfg(all(target_os = "macos", feature = "Social"))] pub mod Social { include!(concat!(env!("OUT_DIR"), "/Social.rs")); } -#[cfg(feature = "SoundAnalysis")] +#[cfg(all(target_os = "macos", feature = "SoundAnalysis"))] pub mod SoundAnalysis { include!(concat!(env!("OUT_DIR"), "/SoundAnalysis.rs")); } -#[cfg(feature = "Speech")] +#[cfg(all(target_os = "macos", feature = "Speech"))] pub mod Speech { include!(concat!(env!("OUT_DIR"), "/Speech.rs")); } -#[cfg(feature = "SpriteKit")] +#[cfg(all(target_os = "macos", feature = "SpriteKit"))] pub mod SpriteKit { include!(concat!(env!("OUT_DIR"), "/SpriteKit.rs")); } -#[cfg(feature = "StoreKit")] +#[cfg(all(target_os = "macos", feature = "StoreKit"))] pub mod StoreKit { include!(concat!(env!("OUT_DIR"), "/StoreKit.rs")); } -#[cfg(feature = "SwiftUI")] +#[cfg(all(target_os = "macos", feature = "SwiftUI"))] pub mod SwiftUI { include!(concat!(env!("OUT_DIR"), "/SwiftUI.rs")); } -#[cfg(feature = "SyncServices")] +#[cfg(all(target_os = "macos", feature = "SyncServices"))] pub mod SyncServices { include!(concat!(env!("OUT_DIR"), "/SyncServices.rs")); } -#[cfg(feature = "SystemConfiguration")] +#[cfg(all(target_os = "macos", feature = "SystemConfiguration"))] pub mod SystemConfiguration { include!(concat!(env!("OUT_DIR"), "/SystemConfiguration.rs")); } -#[cfg(feature = "SystemExtensions")] +#[cfg(all(target_os = "macos", feature = "SystemExtensions"))] pub mod SystemExtensions { include!(concat!(env!("OUT_DIR"), "/SystemExtensions.rs")); } -#[cfg(feature = "TWAIN")] +#[cfg(all(target_os = "macos", feature = "TWAIN"))] pub mod TWAIN { include!(concat!(env!("OUT_DIR"), "/TWAIN.rs")); } -#[cfg(feature = "Tcl")] +#[cfg(all(target_os = "macos", feature = "Tcl"))] pub mod Tcl { include!(concat!(env!("OUT_DIR"), "/Tcl.rs")); } -#[cfg(feature = "ThreadNetwork")] +#[cfg(all(target_os = "macos", feature = "ThreadNetwork"))] pub mod ThreadNetwork { include!(concat!(env!("OUT_DIR"), "/ThreadNetwork.rs")); } -#[cfg(feature = "UniformTypeIdentifiers")] +#[cfg(all(target_os = "macos", feature = "UniformTypeIdentifiers"))] pub mod UniformTypeIdentifiers { include!(concat!(env!("OUT_DIR"), "/UniformTypeIdentifiers.rs")); } -#[cfg(feature = "UserNotifications")] +#[cfg(all(target_os = "macos", feature = "UserNotifications"))] pub mod UserNotifications { include!(concat!(env!("OUT_DIR"), "/UserNotifications.rs")); } -#[cfg(feature = "UserNotificationsUI")] +#[cfg(all(target_os = "macos", feature = "UserNotificationsUI"))] pub mod UserNotificationsUI { include!(concat!(env!("OUT_DIR"), "/UserNotificationsUI.rs")); } -#[cfg(feature = "VideoDecodeAcceleration")] +#[cfg(all(target_os = "macos", feature = "VideoDecodeAcceleration"))] pub mod VideoDecodeAcceleration { include!(concat!(env!("OUT_DIR"), "/VideoDecodeAcceleration.rs")); } -#[cfg(feature = "VideoSubscriberAccount")] +#[cfg(all(target_os = "macos", feature = "VideoSubscriberAccount"))] pub mod VideoSubscriberAccount { include!(concat!(env!("OUT_DIR"), "/VideoSubscriberAccount.rs")); } -#[cfg(feature = "VideoToolbox")] +#[cfg(all(target_os = "macos", feature = "VideoToolbox"))] pub mod VideoToolbox { include!(concat!(env!("OUT_DIR"), "/VideoToolbox.rs")); } -#[cfg(feature = "Virtualization")] +#[cfg(all(target_os = "macos", feature = "Virtualization"))] pub mod Virtualization { include!(concat!(env!("OUT_DIR"), "/Virtualization.rs")); } -#[cfg(feature = "Vision")] +#[cfg(all(target_os = "macos", feature = "Vision"))] pub mod Vision { include!(concat!(env!("OUT_DIR"), "/Vision.rs")); } -#[cfg(feature = "VisionKit")] +#[cfg(all(target_os = "macos", feature = "VisionKit"))] pub mod VisionKit { include!(concat!(env!("OUT_DIR"), "/VisionKit.rs")); } -#[cfg(feature = "WebKit")] +#[cfg(all(target_os = "macos", feature = "WebKit"))] pub mod WebKit { include!(concat!(env!("OUT_DIR"), "/WebKit.rs")); } -#[cfg(feature = "WidgetKit")] +#[cfg(all(target_os = "macos", feature = "WidgetKit"))] pub mod WidgetKit { include!(concat!(env!("OUT_DIR"), "/WidgetKit.rs")); } -#[cfg(feature = "iTunesLibrary")] +#[cfg(all(target_os = "macos", feature = "iTunesLibrary"))] pub mod iTunesLibrary { include!(concat!(env!("OUT_DIR"), "/iTunesLibrary.rs")); } -#[cfg(feature = "vmnet")] +#[cfg(all(target_os = "macos", feature = "vmnet"))] pub mod vmnet { include!(concat!(env!("OUT_DIR"), "/vmnet.rs")); } +#[cfg(all(target_os = "ios", feature = "ARKit"))] +pub mod ARKit { + include!(concat!(env!("OUT_DIR"), "/ARKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "AVFAudio"))] +pub mod AVFAudio { + include!(concat!(env!("OUT_DIR"), "/AVFAudio.rs")); +} +#[cfg(all(target_os = "ios", feature = "AVFoundation"))] +pub mod AVFoundation { + include!(concat!(env!("OUT_DIR"), "/AVFoundation.rs")); +} +#[cfg(all(target_os = "ios", feature = "AVKit"))] +pub mod AVKit { + include!(concat!(env!("OUT_DIR"), "/AVKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "AVRouting"))] +pub mod AVRouting { + include!(concat!(env!("OUT_DIR"), "/AVRouting.rs")); +} +#[cfg(all(target_os = "ios", feature = "Accelerate"))] +pub mod Accelerate { + include!(concat!(env!("OUT_DIR"), "/Accelerate.rs")); +} +#[cfg(all(target_os = "ios", feature = "Accessibility"))] +pub mod Accessibility { + include!(concat!(env!("OUT_DIR"), "/Accessibility.rs")); +} +#[cfg(all(target_os = "ios", feature = "Accounts"))] +pub mod Accounts { + include!(concat!(env!("OUT_DIR"), "/Accounts.rs")); +} +#[cfg(all(target_os = "ios", feature = "ActivityKit"))] +pub mod ActivityKit { + include!(concat!(env!("OUT_DIR"), "/ActivityKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "AdServices"))] +pub mod AdServices { + include!(concat!(env!("OUT_DIR"), "/AdServices.rs")); +} +#[cfg(all(target_os = "ios", feature = "AdSupport"))] +pub mod AdSupport { + include!(concat!(env!("OUT_DIR"), "/AdSupport.rs")); +} +#[cfg(all(target_os = "ios", feature = "AddressBook"))] +pub mod AddressBook { + include!(concat!(env!("OUT_DIR"), "/AddressBook.rs")); +} +#[cfg(all(target_os = "ios", feature = "AddressBookUI"))] +pub mod AddressBookUI { + include!(concat!(env!("OUT_DIR"), "/AddressBookUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "AppClip"))] +pub mod AppClip { + include!(concat!(env!("OUT_DIR"), "/AppClip.rs")); +} +#[cfg(all(target_os = "ios", feature = "AppIntents"))] +pub mod AppIntents { + include!(concat!(env!("OUT_DIR"), "/AppIntents.rs")); +} +#[cfg(all(target_os = "ios", feature = "AppTrackingTransparency"))] +pub mod AppTrackingTransparency { + include!(concat!(env!("OUT_DIR"), "/AppTrackingTransparency.rs")); +} +#[cfg(all(target_os = "ios", feature = "AssetsLibrary"))] +pub mod AssetsLibrary { + include!(concat!(env!("OUT_DIR"), "/AssetsLibrary.rs")); +} +#[cfg(all(target_os = "ios", feature = "AudioToolbox"))] +pub mod AudioToolbox { + include!(concat!(env!("OUT_DIR"), "/AudioToolbox.rs")); +} +#[cfg(all(target_os = "ios", feature = "AudioUnit"))] +pub mod AudioUnit { + include!(concat!(env!("OUT_DIR"), "/AudioUnit.rs")); +} +#[cfg(all(target_os = "ios", feature = "AuthenticationServices"))] +pub mod AuthenticationServices { + include!(concat!(env!("OUT_DIR"), "/AuthenticationServices.rs")); +} +#[cfg(all(target_os = "ios", feature = "AutomaticAssessmentConfiguration"))] +pub mod AutomaticAssessmentConfiguration { + include!(concat!( + env!("OUT_DIR"), + "/AutomaticAssessmentConfiguration.rs" + )); +} +#[cfg(all(target_os = "ios", feature = "BackgroundAssets"))] +pub mod BackgroundAssets { + include!(concat!(env!("OUT_DIR"), "/BackgroundAssets.rs")); +} +#[cfg(all(target_os = "ios", feature = "BackgroundTasks"))] +pub mod BackgroundTasks { + include!(concat!(env!("OUT_DIR"), "/BackgroundTasks.rs")); +} +#[cfg(all(target_os = "ios", feature = "BusinessChat"))] +pub mod BusinessChat { + include!(concat!(env!("OUT_DIR"), "/BusinessChat.rs")); +} +#[cfg(all(target_os = "ios", feature = "CFNetwork"))] +pub mod CFNetwork { + include!(concat!(env!("OUT_DIR"), "/CFNetwork.rs")); +} +#[cfg(all(target_os = "ios", feature = "CallKit"))] +pub mod CallKit { + include!(concat!(env!("OUT_DIR"), "/CallKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "CarPlay"))] +pub mod CarPlay { + include!(concat!(env!("OUT_DIR"), "/CarPlay.rs")); +} +#[cfg(all(target_os = "ios", feature = "ClassKit"))] +pub mod ClassKit { + include!(concat!(env!("OUT_DIR"), "/ClassKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "ClockKit"))] +pub mod ClockKit { + include!(concat!(env!("OUT_DIR"), "/ClockKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "CloudKit"))] +pub mod CloudKit { + include!(concat!(env!("OUT_DIR"), "/CloudKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "ColorSync"))] +pub mod ColorSync { + include!(concat!(env!("OUT_DIR"), "/ColorSync.rs")); +} +#[cfg(all(target_os = "ios", feature = "Contacts"))] +pub mod Contacts { + include!(concat!(env!("OUT_DIR"), "/Contacts.rs")); +} +#[cfg(all(target_os = "ios", feature = "ContactsUI"))] +pub mod ContactsUI { + include!(concat!(env!("OUT_DIR"), "/ContactsUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreAudio"))] +pub mod CoreAudio { + include!(concat!(env!("OUT_DIR"), "/CoreAudio.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreAudioKit"))] +pub mod CoreAudioKit { + include!(concat!(env!("OUT_DIR"), "/CoreAudioKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreBluetooth"))] +pub mod CoreBluetooth { + include!(concat!(env!("OUT_DIR"), "/CoreBluetooth.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreData"))] +pub mod CoreData { + include!(concat!(env!("OUT_DIR"), "/CoreData.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreFoundation"))] +pub mod CoreFoundation { + include!(concat!(env!("OUT_DIR"), "/CoreFoundation.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreGraphics"))] +pub mod CoreGraphics { + include!(concat!(env!("OUT_DIR"), "/CoreGraphics.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreHaptics"))] +pub mod CoreHaptics { + include!(concat!(env!("OUT_DIR"), "/CoreHaptics.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreImage"))] +pub mod CoreImage { + include!(concat!(env!("OUT_DIR"), "/CoreImage.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreLocation"))] +pub mod CoreLocation { + include!(concat!(env!("OUT_DIR"), "/CoreLocation.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreLocationUI"))] +pub mod CoreLocationUI { + include!(concat!(env!("OUT_DIR"), "/CoreLocationUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreMIDI"))] +pub mod CoreMIDI { + include!(concat!(env!("OUT_DIR"), "/CoreMIDI.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreML"))] +pub mod CoreML { + include!(concat!(env!("OUT_DIR"), "/CoreML.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreMedia"))] +pub mod CoreMedia { + include!(concat!(env!("OUT_DIR"), "/CoreMedia.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreMotion"))] +pub mod CoreMotion { + include!(concat!(env!("OUT_DIR"), "/CoreMotion.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreNFC"))] +pub mod CoreNFC { + include!(concat!(env!("OUT_DIR"), "/CoreNFC.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreServices"))] +pub mod CoreServices { + include!(concat!(env!("OUT_DIR"), "/CoreServices.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreSpotlight"))] +pub mod CoreSpotlight { + include!(concat!(env!("OUT_DIR"), "/CoreSpotlight.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreTelephony"))] +pub mod CoreTelephony { + include!(concat!(env!("OUT_DIR"), "/CoreTelephony.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreText"))] +pub mod CoreText { + include!(concat!(env!("OUT_DIR"), "/CoreText.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreTransferable"))] +pub mod CoreTransferable { + include!(concat!(env!("OUT_DIR"), "/CoreTransferable.rs")); +} +#[cfg(all(target_os = "ios", feature = "CoreVideo"))] +pub mod CoreVideo { + include!(concat!(env!("OUT_DIR"), "/CoreVideo.rs")); +} +#[cfg(all(target_os = "ios", feature = "CryptoTokenKit"))] +pub mod CryptoTokenKit { + include!(concat!(env!("OUT_DIR"), "/CryptoTokenKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "DataDetection"))] +pub mod DataDetection { + include!(concat!(env!("OUT_DIR"), "/DataDetection.rs")); +} +#[cfg(all(target_os = "ios", feature = "DeviceCheck"))] +pub mod DeviceCheck { + include!(concat!(env!("OUT_DIR"), "/DeviceCheck.rs")); +} +#[cfg(all(target_os = "ios", feature = "DeviceDiscoveryExtension"))] +pub mod DeviceDiscoveryExtension { + include!(concat!(env!("OUT_DIR"), "/DeviceDiscoveryExtension.rs")); +} +#[cfg(all(target_os = "ios", feature = "EventKit"))] +pub mod EventKit { + include!(concat!(env!("OUT_DIR"), "/EventKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "EventKitUI"))] +pub mod EventKitUI { + include!(concat!(env!("OUT_DIR"), "/EventKitUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "ExposureNotification"))] +pub mod ExposureNotification { + include!(concat!(env!("OUT_DIR"), "/ExposureNotification.rs")); +} +#[cfg(all(target_os = "ios", feature = "ExtensionFoundation"))] +pub mod ExtensionFoundation { + include!(concat!(env!("OUT_DIR"), "/ExtensionFoundation.rs")); +} +#[cfg(all(target_os = "ios", feature = "ExtensionKit"))] +pub mod ExtensionKit { + include!(concat!(env!("OUT_DIR"), "/ExtensionKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "ExternalAccessory"))] +pub mod ExternalAccessory { + include!(concat!(env!("OUT_DIR"), "/ExternalAccessory.rs")); +} +#[cfg(all(target_os = "ios", feature = "FileProvider"))] +pub mod FileProvider { + include!(concat!(env!("OUT_DIR"), "/FileProvider.rs")); +} +#[cfg(all(target_os = "ios", feature = "FileProviderUI"))] +pub mod FileProviderUI { + include!(concat!(env!("OUT_DIR"), "/FileProviderUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "Foundation"))] +pub mod Foundation { + include!(concat!(env!("OUT_DIR"), "/Foundation.rs")); +} +#[cfg(all(target_os = "ios", feature = "GLKit"))] +pub mod GLKit { + include!(concat!(env!("OUT_DIR"), "/GLKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "GSS"))] +pub mod GSS { + include!(concat!(env!("OUT_DIR"), "/GSS.rs")); +} +#[cfg(all(target_os = "ios", feature = "GameController"))] +pub mod GameController { + include!(concat!(env!("OUT_DIR"), "/GameController.rs")); +} +#[cfg(all(target_os = "ios", feature = "GameKit"))] +pub mod GameKit { + include!(concat!(env!("OUT_DIR"), "/GameKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "GameplayKit"))] +pub mod GameplayKit { + include!(concat!(env!("OUT_DIR"), "/GameplayKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "HealthKit"))] +pub mod HealthKit { + include!(concat!(env!("OUT_DIR"), "/HealthKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "HealthKitUI"))] +pub mod HealthKitUI { + include!(concat!(env!("OUT_DIR"), "/HealthKitUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "HomeKit"))] +pub mod HomeKit { + include!(concat!(env!("OUT_DIR"), "/HomeKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "IOSurface"))] +pub mod IOSurface { + include!(concat!(env!("OUT_DIR"), "/IOSurface.rs")); +} +#[cfg(all(target_os = "ios", feature = "IdentityLookup"))] +pub mod IdentityLookup { + include!(concat!(env!("OUT_DIR"), "/IdentityLookup.rs")); +} +#[cfg(all(target_os = "ios", feature = "IdentityLookupUI"))] +pub mod IdentityLookupUI { + include!(concat!(env!("OUT_DIR"), "/IdentityLookupUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "ImageCaptureCore"))] +pub mod ImageCaptureCore { + include!(concat!(env!("OUT_DIR"), "/ImageCaptureCore.rs")); +} +#[cfg(all(target_os = "ios", feature = "ImageIO"))] +pub mod ImageIO { + include!(concat!(env!("OUT_DIR"), "/ImageIO.rs")); +} +#[cfg(all(target_os = "ios", feature = "Intents"))] +pub mod Intents { + include!(concat!(env!("OUT_DIR"), "/Intents.rs")); +} +#[cfg(all(target_os = "ios", feature = "IntentsUI"))] +pub mod IntentsUI { + include!(concat!(env!("OUT_DIR"), "/IntentsUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "JavaScriptCore"))] +pub mod JavaScriptCore { + include!(concat!(env!("OUT_DIR"), "/JavaScriptCore.rs")); +} +#[cfg(all(target_os = "ios", feature = "LinkPresentation"))] +pub mod LinkPresentation { + include!(concat!(env!("OUT_DIR"), "/LinkPresentation.rs")); +} +#[cfg(all(target_os = "ios", feature = "LocalAuthentication"))] +pub mod LocalAuthentication { + include!(concat!(env!("OUT_DIR"), "/LocalAuthentication.rs")); +} +#[cfg(all(target_os = "ios", feature = "LocalAuthenticationEmbeddedUI"))] +pub mod LocalAuthenticationEmbeddedUI { + include!(concat!( + env!("OUT_DIR"), + "/LocalAuthenticationEmbeddedUI.rs" + )); +} +#[cfg(all(target_os = "ios", feature = "MLCompute"))] +pub mod MLCompute { + include!(concat!(env!("OUT_DIR"), "/MLCompute.rs")); +} +#[cfg(all(target_os = "ios", feature = "MapKit"))] +pub mod MapKit { + include!(concat!(env!("OUT_DIR"), "/MapKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "Matter"))] +pub mod Matter { + include!(concat!(env!("OUT_DIR"), "/Matter.rs")); +} +#[cfg(all(target_os = "ios", feature = "MatterSupport"))] +pub mod MatterSupport { + include!(concat!(env!("OUT_DIR"), "/MatterSupport.rs")); +} +#[cfg(all(target_os = "ios", feature = "MediaAccessibility"))] +pub mod MediaAccessibility { + include!(concat!(env!("OUT_DIR"), "/MediaAccessibility.rs")); +} +#[cfg(all(target_os = "ios", feature = "MediaPlayer"))] +pub mod MediaPlayer { + include!(concat!(env!("OUT_DIR"), "/MediaPlayer.rs")); +} +#[cfg(all(target_os = "ios", feature = "MediaSetup"))] +pub mod MediaSetup { + include!(concat!(env!("OUT_DIR"), "/MediaSetup.rs")); +} +#[cfg(all(target_os = "ios", feature = "MediaToolbox"))] +pub mod MediaToolbox { + include!(concat!(env!("OUT_DIR"), "/MediaToolbox.rs")); +} +#[cfg(all(target_os = "ios", feature = "MessageUI"))] +pub mod MessageUI { + include!(concat!(env!("OUT_DIR"), "/MessageUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "Messages"))] +pub mod Messages { + include!(concat!(env!("OUT_DIR"), "/Messages.rs")); +} +#[cfg(all(target_os = "ios", feature = "Metal"))] +pub mod Metal { + include!(concat!(env!("OUT_DIR"), "/Metal.rs")); +} +#[cfg(all(target_os = "ios", feature = "MetalFX"))] +pub mod MetalFX { + include!(concat!(env!("OUT_DIR"), "/MetalFX.rs")); +} +#[cfg(all(target_os = "ios", feature = "MetalKit"))] +pub mod MetalKit { + include!(concat!(env!("OUT_DIR"), "/MetalKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "MetalPerformanceShaders"))] +pub mod MetalPerformanceShaders { + include!(concat!(env!("OUT_DIR"), "/MetalPerformanceShaders.rs")); +} +#[cfg(all(target_os = "ios", feature = "MetalPerformanceShadersGraph"))] +pub mod MetalPerformanceShadersGraph { + include!(concat!(env!("OUT_DIR"), "/MetalPerformanceShadersGraph.rs")); +} +#[cfg(all(target_os = "ios", feature = "MetricKit"))] +pub mod MetricKit { + include!(concat!(env!("OUT_DIR"), "/MetricKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "MobileCoreServices"))] +pub mod MobileCoreServices { + include!(concat!(env!("OUT_DIR"), "/MobileCoreServices.rs")); +} +#[cfg(all(target_os = "ios", feature = "ModelIO"))] +pub mod ModelIO { + include!(concat!(env!("OUT_DIR"), "/ModelIO.rs")); +} +#[cfg(all(target_os = "ios", feature = "MultipeerConnectivity"))] +pub mod MultipeerConnectivity { + include!(concat!(env!("OUT_DIR"), "/MultipeerConnectivity.rs")); +} +#[cfg(all(target_os = "ios", feature = "NaturalLanguage"))] +pub mod NaturalLanguage { + include!(concat!(env!("OUT_DIR"), "/NaturalLanguage.rs")); +} +#[cfg(all(target_os = "ios", feature = "NearbyInteraction"))] +pub mod NearbyInteraction { + include!(concat!(env!("OUT_DIR"), "/NearbyInteraction.rs")); +} +#[cfg(all(target_os = "ios", feature = "Network"))] +pub mod Network { + include!(concat!(env!("OUT_DIR"), "/Network.rs")); +} +#[cfg(all(target_os = "ios", feature = "NetworkExtension"))] +pub mod NetworkExtension { + include!(concat!(env!("OUT_DIR"), "/NetworkExtension.rs")); +} +#[cfg(all(target_os = "ios", feature = "NewsstandKit"))] +pub mod NewsstandKit { + include!(concat!(env!("OUT_DIR"), "/NewsstandKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "NotificationCenter"))] +pub mod NotificationCenter { + include!(concat!(env!("OUT_DIR"), "/NotificationCenter.rs")); +} +#[cfg(all(target_os = "ios", feature = "OSLog"))] +pub mod OSLog { + include!(concat!(env!("OUT_DIR"), "/OSLog.rs")); +} +#[cfg(all(target_os = "ios", feature = "OpenAL"))] +pub mod OpenAL { + include!(concat!(env!("OUT_DIR"), "/OpenAL.rs")); +} +#[cfg(all(target_os = "ios", feature = "OpenGLES"))] +pub mod OpenGLES { + include!(concat!(env!("OUT_DIR"), "/OpenGLES.rs")); +} +#[cfg(all(target_os = "ios", feature = "PDFKit"))] +pub mod PDFKit { + include!(concat!(env!("OUT_DIR"), "/PDFKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "PHASE"))] +pub mod PHASE { + include!(concat!(env!("OUT_DIR"), "/PHASE.rs")); +} +#[cfg(all(target_os = "ios", feature = "PassKit"))] +pub mod PassKit { + include!(concat!(env!("OUT_DIR"), "/PassKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "PencilKit"))] +pub mod PencilKit { + include!(concat!(env!("OUT_DIR"), "/PencilKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "Photos"))] +pub mod Photos { + include!(concat!(env!("OUT_DIR"), "/Photos.rs")); +} +#[cfg(all(target_os = "ios", feature = "PhotosUI"))] +pub mod PhotosUI { + include!(concat!(env!("OUT_DIR"), "/PhotosUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "ProximityReader"))] +pub mod ProximityReader { + include!(concat!(env!("OUT_DIR"), "/ProximityReader.rs")); +} +#[cfg(all(target_os = "ios", feature = "PushKit"))] +pub mod PushKit { + include!(concat!(env!("OUT_DIR"), "/PushKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "PushToTalk"))] +pub mod PushToTalk { + include!(concat!(env!("OUT_DIR"), "/PushToTalk.rs")); +} +#[cfg(all(target_os = "ios", feature = "QuartzCore"))] +pub mod QuartzCore { + include!(concat!(env!("OUT_DIR"), "/QuartzCore.rs")); +} +#[cfg(all(target_os = "ios", feature = "QuickLook"))] +pub mod QuickLook { + include!(concat!(env!("OUT_DIR"), "/QuickLook.rs")); +} +#[cfg(all(target_os = "ios", feature = "QuickLookThumbnailing"))] +pub mod QuickLookThumbnailing { + include!(concat!(env!("OUT_DIR"), "/QuickLookThumbnailing.rs")); +} +#[cfg(all(target_os = "ios", feature = "ReplayKit"))] +pub mod ReplayKit { + include!(concat!(env!("OUT_DIR"), "/ReplayKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "RoomPlan"))] +pub mod RoomPlan { + include!(concat!(env!("OUT_DIR"), "/RoomPlan.rs")); +} +#[cfg(all(target_os = "ios", feature = "SafariServices"))] +pub mod SafariServices { + include!(concat!(env!("OUT_DIR"), "/SafariServices.rs")); +} +#[cfg(all(target_os = "ios", feature = "SafetyKit"))] +pub mod SafetyKit { + include!(concat!(env!("OUT_DIR"), "/SafetyKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "SceneKit"))] +pub mod SceneKit { + include!(concat!(env!("OUT_DIR"), "/SceneKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "ScreenTime"))] +pub mod ScreenTime { + include!(concat!(env!("OUT_DIR"), "/ScreenTime.rs")); +} +#[cfg(all(target_os = "ios", feature = "Security"))] +pub mod Security { + include!(concat!(env!("OUT_DIR"), "/Security.rs")); +} +#[cfg(all(target_os = "ios", feature = "SensorKit"))] +pub mod SensorKit { + include!(concat!(env!("OUT_DIR"), "/SensorKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "SharedWithYou"))] +pub mod SharedWithYou { + include!(concat!(env!("OUT_DIR"), "/SharedWithYou.rs")); +} +#[cfg(all(target_os = "ios", feature = "SharedWithYouCore"))] +pub mod SharedWithYouCore { + include!(concat!(env!("OUT_DIR"), "/SharedWithYouCore.rs")); +} +#[cfg(all(target_os = "ios", feature = "ShazamKit"))] +pub mod ShazamKit { + include!(concat!(env!("OUT_DIR"), "/ShazamKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "Social"))] +pub mod Social { + include!(concat!(env!("OUT_DIR"), "/Social.rs")); +} +#[cfg(all(target_os = "ios", feature = "SoundAnalysis"))] +pub mod SoundAnalysis { + include!(concat!(env!("OUT_DIR"), "/SoundAnalysis.rs")); +} +#[cfg(all(target_os = "ios", feature = "Speech"))] +pub mod Speech { + include!(concat!(env!("OUT_DIR"), "/Speech.rs")); +} +#[cfg(all(target_os = "ios", feature = "SpriteKit"))] +pub mod SpriteKit { + include!(concat!(env!("OUT_DIR"), "/SpriteKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "StoreKit"))] +pub mod StoreKit { + include!(concat!(env!("OUT_DIR"), "/StoreKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "SwiftUI"))] +pub mod SwiftUI { + include!(concat!(env!("OUT_DIR"), "/SwiftUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "SystemConfiguration"))] +pub mod SystemConfiguration { + include!(concat!(env!("OUT_DIR"), "/SystemConfiguration.rs")); +} +#[cfg(all(target_os = "ios", feature = "ThreadNetwork"))] +pub mod ThreadNetwork { + include!(concat!(env!("OUT_DIR"), "/ThreadNetwork.rs")); +} +#[cfg(all(target_os = "ios", feature = "Twitter"))] +pub mod Twitter { + include!(concat!(env!("OUT_DIR"), "/Twitter.rs")); +} +#[cfg(all(target_os = "ios", feature = "UIKit"))] +pub mod UIKit { + include!(concat!(env!("OUT_DIR"), "/UIKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "UniformTypeIdentifiers"))] +pub mod UniformTypeIdentifiers { + include!(concat!(env!("OUT_DIR"), "/UniformTypeIdentifiers.rs")); +} +#[cfg(all(target_os = "ios", feature = "UserNotifications"))] +pub mod UserNotifications { + include!(concat!(env!("OUT_DIR"), "/UserNotifications.rs")); +} +#[cfg(all(target_os = "ios", feature = "UserNotificationsUI"))] +pub mod UserNotificationsUI { + include!(concat!(env!("OUT_DIR"), "/UserNotificationsUI.rs")); +} +#[cfg(all(target_os = "ios", feature = "VideoSubscriberAccount"))] +pub mod VideoSubscriberAccount { + include!(concat!(env!("OUT_DIR"), "/VideoSubscriberAccount.rs")); +} +#[cfg(all(target_os = "ios", feature = "VideoToolbox"))] +pub mod VideoToolbox { + include!(concat!(env!("OUT_DIR"), "/VideoToolbox.rs")); +} +#[cfg(all(target_os = "ios", feature = "Vision"))] +pub mod Vision { + include!(concat!(env!("OUT_DIR"), "/Vision.rs")); +} +#[cfg(all(target_os = "ios", feature = "VisionKit"))] +pub mod VisionKit { + include!(concat!(env!("OUT_DIR"), "/VisionKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "WatchConnectivity"))] +pub mod WatchConnectivity { + include!(concat!(env!("OUT_DIR"), "/WatchConnectivity.rs")); +} +#[cfg(all(target_os = "ios", feature = "WebKit"))] +pub mod WebKit { + include!(concat!(env!("OUT_DIR"), "/WebKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "WidgetKit"))] +pub mod WidgetKit { + include!(concat!(env!("OUT_DIR"), "/WidgetKit.rs")); +} +#[cfg(all(target_os = "ios", feature = "iAd"))] +pub mod iAd { + include!(concat!(env!("OUT_DIR"), "/iAd.rs")); +} From d0cb76b41afca2c35d3868da321febe921f75e45 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Thu, 26 Jan 2023 21:08:19 +0900 Subject: [PATCH 2/2] 0.2.0 --- bindgen/Cargo.toml | 2 +- sys/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml index b1fb7e8..0780489 100644 --- a/bindgen/Cargo.toml +++ b/bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apple-bindgen" -version = "0.1.3" +version = "0.2.0" edition = "2021" description = "bindgen helper for Apple frameworks" keywords = ["sys", "apple", "macos", "bindgen"] diff --git a/sys/Cargo.toml b/sys/Cargo.toml index ab1579c..0877fa5 100644 --- a/sys/Cargo.toml +++ b/sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apple-sys" -version = "0.1.2" +version = "0.2.0" edition = "2021" description = "The auto-managed -sys crate for Apple platforms using bindgen directly from build environment" keywords = ["sys", "apple", "macos", "bindgen"] @@ -17,7 +17,7 @@ include = ["/src", "/*.rs"] objc = { version = "0.2.7", optional = true } [build-dependencies] -apple-bindgen = { path = "../bindgen", version = "0.1.3", default-features=false } +apple-bindgen = { path = "../bindgen", version = "0.2.0", default-features=false } apple-sdk = "0.4.0" [features]