apple_bundle/entitlements/
hypervisor.rs

1use serde::{Deserialize, Serialize};
2
3/// Hypervisor
4#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq)]
5pub struct Hypervisor {
6    /// A Boolean value that indicates whether the app creates and manages virtual
7    /// machines.
8    ///
9    /// The entitlement is required to use the Hypervisor APIs in any process.
10    ///
11    /// ### Important
12    /// If your app has a deployment target of macOS 10.15 or earlier, add the
13    /// com.apple.vm.hypervisor entitlement to your app in addition to this entitlement.
14    ///
15    /// ## Availability
16    /// * macOS 11.0+
17    ///
18    /// ## Framework
19    /// * Hypervisor
20    #[serde(
21        rename = "com.apple.security.hypervisor",
22        serialize_with = "crate::serialize_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub security_hypervisor: Option<bool>,
26    /// A Boolean value that indicates whether the app creates and manages virtual
27    /// machines.
28    ///
29    /// The entitlement is required to use the Hypervisor APIs in a sandboxed process.
30    ///
31    /// ## Availability
32    /// * macOS 10.10–11.0
33    ///
34    /// ## Framework
35    /// * Hypervisor
36    #[deprecated(
37        since = "macOS 10.10-11.0",
38        note = "For apps with a deployment target of macOS 11 and later, use com.apple.security.hypervisor instead.
39        For deployment targets earlier than macOS 11, add both that and the com.apple.vm.hypervisor entitlement to your app."
40    )]
41    #[serde(
42        rename = "com.apple.vm.hypervisor",
43        serialize_with = "crate::serialize_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub vm_hypervisor: Option<bool>,
47    /// A Boolean value that indicates whether the app captures USB devices and uses them
48    /// in the guest-operating system.
49    ///
50    /// The entitlement is required to use the IOUSBHost APIs for USB device capture.
51    ///
52    /// ## Availability
53    /// * macOS 10.10+
54    ///
55    /// ## Framework
56    /// * Hypervisor
57    #[serde(
58        rename = "com.apple.vm.device-access",
59        serialize_with = "crate::serialize_option",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub vm_device_access: Option<bool>,
63    /// A Boolean that indicates whether the app manages virtual network interfaces
64    /// without escalating privileges to the root user.
65    ///
66    /// The entitlement is required to use the vmnet APIs.
67    ///
68    /// ### Note
69    /// This entitlement is restricted to developers of virtualization software.
70    /// To request this entitlement, contact your Apple representative.
71    ///
72    /// ## Availability
73    /// * macOS 10.10+
74    ///
75    /// ## Framework
76    /// * Hypervisor
77    #[serde(
78        rename = "com.apple.vm.networking",
79        serialize_with = "crate::serialize_option",
80        skip_serializing_if = "Option::is_none"
81    )]
82    pub vm_networking: Option<bool>,
83    /// A Boolean that indicates whether the app can use the Virtualization framework.
84    ///
85    /// Read the value of isSupported to check for the presence of both this entitlement
86    /// and the hardware support needed for virtualization.
87    ///
88    /// ## Availability
89    /// * macOS 11.0+
90    ///
91    /// ## Framework
92    /// * Hypervisor
93    #[serde(
94        rename = "com.apple.security.virtualization",
95        serialize_with = "crate::serialize_option",
96        skip_serializing_if = "Option::is_none"
97    )]
98    pub security_virtualization: Option<bool>,
99}