From 85f131871a39974b18b7ff4d1f38b583da09bb6b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 19 May 2024 22:16:19 +0200 Subject: [PATCH] Refactor dependency and imports calculation --- Cargo.lock | 1 - crates/header-translator/src/config.rs | 20 +- crates/header-translator/src/context.rs | 16 +- .../header-translator/src/default_cargo.toml | 5 +- crates/header-translator/src/expr.rs | 6 +- crates/header-translator/src/id.rs | 276 +++++++++++------- crates/header-translator/src/library.rs | 45 ++- crates/header-translator/src/main.rs | 6 +- crates/header-translator/src/method.rs | 3 + crates/header-translator/src/module.rs | 49 +--- crates/header-translator/src/rust_type.rs | 141 ++++++--- crates/header-translator/src/stmt.rs | 11 +- .../objc2-accessibility/Cargo.toml | 10 +- framework-crates/objc2-accounts/Cargo.toml | 8 +- framework-crates/objc2-ad-services/Cargo.toml | 6 +- framework-crates/objc2-ad-support/Cargo.toml | 6 +- .../objc2-app-kit/Cargo.modified.toml | 10 - framework-crates/objc2-app-kit/Cargo.toml | 10 +- .../Cargo.toml | 7 +- .../objc2-authentication-services/Cargo.toml | 12 +- .../Cargo.toml | 8 +- framework-crates/objc2-automator/Cargo.toml | 10 +- framework-crates/objc2-av-kit/Cargo.toml | 12 +- .../objc2-background-assets/Cargo.toml | 8 +- .../objc2-background-tasks/Cargo.toml | 8 +- .../objc2-business-chat/Cargo.toml | 8 +- framework-crates/objc2-call-kit/Cargo.toml | 8 +- framework-crates/objc2-class-kit/Cargo.toml | 8 +- framework-crates/objc2-cloud-kit/Cargo.toml | 12 +- framework-crates/objc2-contacts-ui/Cargo.toml | 10 +- framework-crates/objc2-contacts/Cargo.toml | 8 +- .../objc2-core-bluetooth/Cargo.toml | 8 +- .../objc2-core-data/Cargo.modified.toml | 10 - framework-crates/objc2-core-data/Cargo.toml | 8 +- .../objc2-core-image/Cargo.modified.toml | 4 - framework-crates/objc2-core-image/Cargo.toml | 6 +- .../objc2-core-location/Cargo.toml | 10 +- framework-crates/objc2-core-ml/Cargo.toml | 12 +- framework-crates/objc2-core-motion/Cargo.toml | 12 +- framework-crates/objc2-core-wlan/Cargo.toml | 8 +- .../objc2-data-detection/Cargo.toml | 6 +- .../objc2-device-check/Cargo.toml | 8 +- framework-crates/objc2-event-kit/Cargo.toml | 16 +- .../objc2-exception-handling/Cargo.toml | 6 +- .../objc2-extension-kit/Cargo.toml | 8 +- .../objc2-external-accessory/Cargo.toml | 10 +- .../objc2-file-provider-ui/Cargo.toml | 12 +- .../objc2-file-provider/Cargo.toml | 12 +- framework-crates/objc2-finder-sync/Cargo.toml | 10 +- .../objc2-foundation/Cargo.modified.toml | 8 - framework-crates/objc2-foundation/Cargo.toml | 10 +- .../objc2-game-controller/Cargo.toml | 12 +- framework-crates/objc2-game-kit/Cargo.toml | 10 +- framework-crates/objc2-health-kit/Cargo.toml | 14 +- .../objc2-identity-lookup/Cargo.toml | 8 +- .../objc2-input-method-kit/Cargo.toml | 8 +- .../objc2-link-presentation/Cargo.toml | 10 +- .../Cargo.toml | 12 +- .../objc2-local-authentication/Cargo.toml | 8 +- framework-crates/objc2-mail-kit/Cargo.toml | 10 +- framework-crates/objc2-map-kit/Cargo.toml | 16 +- .../objc2-media-player/Cargo.toml | 12 +- framework-crates/objc2-metal-fx/Cargo.toml | 8 +- framework-crates/objc2-metal-kit/Cargo.toml | 14 +- framework-crates/objc2-metal/Cargo.toml | 10 +- framework-crates/objc2-metric-kit/Cargo.toml | 8 +- framework-crates/objc2-ml-compute/Cargo.toml | 12 +- .../objc2-multipeer-connectivity/Cargo.toml | 10 +- .../objc2-natural-language/Cargo.toml | 10 +- .../objc2-nearby-interaction/Cargo.toml | 6 +- .../objc2-network-extension/Cargo.toml | 10 +- framework-crates/objc2-osa-kit/Cargo.toml | 10 +- framework-crates/objc2-photos-ui/Cargo.toml | 18 +- framework-crates/objc2-photos/Cargo.toml | 18 +- .../objc2-quartz-core/Cargo.modified.toml | 10 - framework-crates/objc2-quartz-core/Cargo.toml | 8 +- .../objc2-screen-capture-kit/Cargo.toml | 12 +- .../Cargo.toml | 8 +- .../objc2-service-management/Cargo.toml | 8 +- framework-crates/objc2-social/Cargo.toml | 12 +- .../objc2-sound-analysis/Cargo.toml | 8 +- framework-crates/objc2-speech/Cargo.toml | 8 +- framework-crates/objc2-store-kit/Cargo.toml | 12 +- framework-crates/objc2-symbols/Cargo.toml | 6 +- framework-crates/objc2-ui-kit/Cargo.toml | 28 +- .../objc2-uniform-type-identifiers/Cargo.toml | 8 +- .../objc2-user-notifications/Cargo.toml | 12 +- .../objc2-virtualization/Cargo.toml | 12 +- framework-crates/objc2-vision/Cargo.toml | 12 +- framework-crates/objc2-web-kit/Cargo.toml | 12 +- generated | 2 +- 91 files changed, 716 insertions(+), 648 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 012009a62..03669767a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -409,7 +409,6 @@ version = "0.2.0" dependencies = [ "block2", "objc2", - "objc2-foundation", ] [[package]] diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 464d84f13..6eef29351 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -8,7 +8,7 @@ use heck::ToTrainCase; use semver::Version; use serde::{de, Deserialize, Deserializer}; -use crate::id::{Location, LocationLibrary}; +use crate::id::Location; use crate::stmt::{Derives, Mutability}; use crate::ItemIdentifier; @@ -21,16 +21,14 @@ pub struct Config { impl Config { pub fn library(&self, location: impl AsRef) -> &LibraryConfig { let location = location.as_ref(); - match location.library() { - LocationLibrary::System => &self.system, - LocationLibrary::Library(library) => self.libraries.get(library).unwrap_or_else(|| { + let library_name = location.library_name(); + if library_name == "System" || library_name == "objc2" { + &self.system + } else { + self.libraries.get(library_name).unwrap_or_else(|| { error!("tried to get library config from {location:?}"); &self.system - }), - _ => { - error!("tried to get library config from {location:?}"); - &self.system - } + }) } } @@ -310,8 +308,8 @@ impl<'de> Deserialize<'de> for Mutability { let (library, rest) = value.split_once("::")?; let (file_name, name) = rest.split_once("::")?; Some(ItemIdentifier::from_raw( - name.to_string(), - vec![library.to_string(), file_name.to_string()], + name.into(), + vec![library.to_string().into(), file_name.to_string().into()], )) } diff --git a/crates/header-translator/src/context.rs b/crates/header-translator/src/context.rs index c5b469242..e0192bd1c 100644 --- a/crates/header-translator/src/context.rs +++ b/crates/header-translator/src/context.rs @@ -1,3 +1,4 @@ +use std::borrow::Cow; use std::collections::HashMap; use std::ops; use std::path::{Path, PathBuf}; @@ -30,7 +31,7 @@ impl<'a> Context<'a> { if let Some(file) = location.get_file_location().file { let path = file.get_path(); if let Ok(path) = path.strip_prefix(&self.framework_dir) { - let mut components: Vec<_> = path + let mut components: Vec> = path .components() .filter(|component| { component.as_os_str() != "Headers" @@ -39,14 +40,14 @@ impl<'a> Context<'a> { .map(|component| component.as_os_str().to_str().expect("component to_str")) .map(|component| component.strip_suffix(".framework").unwrap_or(component)) .map(|component| component.strip_suffix(".h").unwrap_or(component)) - .map(|s| s.to_string()) + .map(|s| s.to_string().into()) .collect(); // Put items in umbrella header in `mod.rs` if let [.., innermost_framework_name, file_name] = &*components { let umbrella_header = self .libraries - .get(innermost_framework_name) + .get(&**innermost_framework_name) .and_then(|lib| lib.umbrella_header.as_deref()) .unwrap_or(innermost_framework_name); @@ -57,11 +58,14 @@ impl<'a> Context<'a> { return Some(Location::from_components(components)); } else if let Ok(path) = path.strip_prefix(&self.include_dir) { - if path.starts_with("objc") || path == Path::new("MacTypes.h") { - return Some(Location::from_components(vec!["System".to_string()])); + if path.starts_with("objc") { + return Some(Location::from_components(vec!["objc2".into()])); + } + if path == Path::new("MacTypes.h") { + return Some(Location::from_components(vec!["System".into()])); } if path.starts_with("sys") { - return Some(Location::from_components(vec!["libc".to_string()])); + return Some(Location::from_components(vec!["libc".into()])); } } } diff --git a/crates/header-translator/src/default_cargo.toml b/crates/header-translator/src/default_cargo.toml index eda878814..e7752eba7 100644 --- a/crates/header-translator/src/default_cargo.toml +++ b/crates/header-translator/src/default_cargo.toml @@ -21,7 +21,6 @@ license = "MIT" workspace = true [dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } [package.metadata.docs.rs] default-target = "UNSET" @@ -33,5 +32,5 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc"] +alloc = [] diff --git a/crates/header-translator/src/expr.rs b/crates/header-translator/src/expr.rs index d54b0ab81..f15c1c1d1 100644 --- a/crates/header-translator/src/expr.rs +++ b/crates/header-translator/src/expr.rs @@ -203,9 +203,9 @@ impl Expr { Self::Signed(_) => {} Self::Unsigned(_) => {} Self::Float(_) => {} - Self::MacroInvocation { evaluated, .. } => { + Self::MacroInvocation { evaluated, id } => { if evaluated.is_none() { - // features.add_item(&id); + items.push(id.clone()); } } Self::Enum { id, .. } => { @@ -214,7 +214,7 @@ impl Expr { Self::Const(id) => { items.push(id.clone()); } - Self::Var { id, ty, .. } => { + Self::Var { id, ty } => { items.push(id.clone()); items.extend(ty.required_items()); } diff --git a/crates/header-translator/src/id.rs b/crates/header-translator/src/id.rs index c677a28ef..0cb3f328d 100644 --- a/crates/header-translator/src/id.rs +++ b/crates/header-translator/src/id.rs @@ -1,5 +1,6 @@ use core::fmt; use core::hash; +use std::borrow::Cow; use std::cmp::Ordering; use std::collections::BTreeSet; @@ -34,125 +35,155 @@ impl ToOptionString for () { #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Location { - path_components: Vec, + path_components: Vec>, } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum LocationLibrary<'a> { +pub enum LocationLibrary<'location, 'config> { System, Bitflags, Block2, Libc, - Library(&'a str), + Objc2, + InSameLibrary { + library: &'location str, + file_name: Option<&'location str>, + krate: &'config str, + }, + InExternalLibrary { + library: &'location str, + file_name: Option<&'location str>, + krate: &'config str, + required: bool, + }, +} + +impl<'location, 'config> LocationLibrary<'location, 'config> { + pub fn krate(&self) -> Option<(&'config str, bool)> { + match self { + Self::System => None, + Self::Bitflags => Some(("bitflags", false)), + Self::Block2 => Some(("block2", false)), + Self::Libc => Some(("libc", false)), + Self::Objc2 => Some(("objc2", true)), + Self::InSameLibrary { .. } => None, + Self::InExternalLibrary { + krate, required, .. + } => Some((krate, *required)), + } + } + + pub fn import(&self) -> Option<(&'config str, bool)> { + match self { + Self::Objc2 => Some(("objc2::__framework_prelude", true)), + Self::InExternalLibrary { + krate, required, .. + } => Some((krate, *required)), + _ => None, + } + } + + pub fn cargo_toml_feature(&self) -> Option { + match self { + Self::Bitflags => Some("bitflags".to_string()), + Self::InExternalLibrary { + file_name: Some(file_name), + krate, + required, + .. + } => Some(format!( + "{krate}{}/{}", + if *required { "" } else { "?" }, + clean_name(file_name), + )), + _ => None, + } + } + + fn feature(&self) -> Option { + match self { + Self::Block2 => Some("block2".to_string()), + Self::Libc => Some("libc".to_string()), + // Always enabled in the current file + Self::Bitflags | Self::Objc2 => None, + Self::InSameLibrary { + file_name: Some(file_name), + .. + } => Some(clean_name(file_name)), + Self::InExternalLibrary { + krate, + required: false, + .. + } => Some(krate.to_string()), + _ => None, + } + } } impl Location { - pub(crate) fn from_components(path_components: Vec) -> Self { + pub(crate) fn from_components(path_components: Vec>) -> Self { Self { path_components } } - pub fn library_name(&self) -> &String { + pub fn library_name(&self) -> &str { self.path_components .first() .expect("location to have at least one component") } + fn file_name(&self) -> Option<&str> { + match &*self.path_components { + [_, .., file_name] => Some(&**file_name), + // Umbrella header + [_] | [] => None, + } + } + pub fn modules(&self) -> impl IntoIterator + '_ { self.path_components.iter().skip(1).map(|s| &**s) } - pub fn library(&self) -> LocationLibrary<'_> { - match &**self.library_name() { + pub fn library<'location, 'config>( + &'location self, + config: &'config Config, + emission_library: &str, + ) -> LocationLibrary<'location, 'config> { + match self.library_name() { "System" => LocationLibrary::System, "bitflags" => LocationLibrary::Bitflags, "block2" => LocationLibrary::Block2, "libc" => LocationLibrary::Libc, - library => LocationLibrary::Library(library), - } - } - - pub fn krate<'a>(&self, config: &'a Config) -> Option<&'a str> { - match self.library() { - LocationLibrary::System => None, - LocationLibrary::Bitflags => Some("bitflags"), - LocationLibrary::Block2 => Some("block2"), - LocationLibrary::Libc => Some("libc"), - LocationLibrary::Library(library) => Some(&config.libraries.get(library)?.krate), - } - } - - pub fn import<'a>(&self, config: &'a Config) -> Option<&'a str> { - match self.library() { - LocationLibrary::Library(library) => Some(&config.libraries.get(library)?.krate), - _ => None, - } - } - - pub fn assert_file(&self, file_name: &str) { - assert_eq!(self.path_components.last().map(|s| &**s), Some(file_name)); - } - - /// Only the library of the emmision location matters. - pub fn cargo_toml_feature(&self, config: &Config, emission_library: &str) -> Option { - match self.library() { - LocationLibrary::System | LocationLibrary::Block2 | LocationLibrary::Libc => None, - LocationLibrary::Bitflags => Some("bitflags".to_string()), - LocationLibrary::Library(library) => { - if library == emission_library { - None - } else if let Some(krate) = Some(&config.libraries.get(library)?.krate) { - let required = config.libraries[emission_library] - .required_dependencies - .contains(krate); - - match &*self.path_components { - [_, .., file_name] => Some(format!( - "{krate}{}/{}", - if required { "" } else { "?" }, - clean_name(file_name) - )), - // Umbrella header - [_] | [] => None, + "objc2" => LocationLibrary::Objc2, + library => { + if let Some(krate) = config.libraries.get(library).map(|lib| &*lib.krate) { + if library == emission_library { + LocationLibrary::InSameLibrary { + library, + file_name: self.file_name(), + krate, + } + } else { + let file_name = self.file_name(); + let required = config.libraries[emission_library] + .required_dependencies + .contains(krate); + LocationLibrary::InExternalLibrary { + library, + file_name, + krate, + required, + } } } else { - debug!(?self, "failed getting crate name"); - None + debug!(location = ?self, "failed getting crate name"); + LocationLibrary::System } } } } - /// Only the library of the emmision location matters. - fn feature(&self, config: &Config, emission_location: &Self) -> Option { - match self.library() { - LocationLibrary::System => None, - LocationLibrary::Block2 => Some("block2".to_string()), - LocationLibrary::Libc => Some("libc".to_string()), - // Always enabled in the current file - LocationLibrary::Bitflags => None, - LocationLibrary::Library(library) => { - let emission_library = emission_location.path_components.first().unwrap(); - if library == emission_library { - match &*self.path_components { - [_, .., file_name] => Some(clean_name(file_name)), - // Umbrella header - [_] | [] => None, - } - } else if let Some(krate) = Some(&config.libraries.get(library)?.krate) { - let required = config.libraries[emission_library] - .required_dependencies - .contains(krate); - if required { - None - } else { - Some(krate.to_string()) - } - } else { - debug!(?self, "tried to get feature name of unknown library"); - None - } - } - } + pub fn assert_file(&self, file_name: &str) { + assert_eq!(self.file_name(), Some(file_name)); } } @@ -196,7 +227,7 @@ impl ItemIdentifier { self.location.library_name() } - pub fn from_raw(name: N, path_components: Vec) -> Self { + pub fn from_raw(name: N, path_components: Vec>) -> Self { Self { name, location: Location { path_components }, @@ -206,16 +237,15 @@ impl ItemIdentifier { pub fn with_name(name: N, entity: &Entity<'_>, context: &Context<'_>) -> Self { let mut location = context.get_location(entity).unwrap_or_else(|| { warn!(?entity, "ItemIdentifier from unknown header"); - Location::from_components(vec!["__Unknown__".to_string()]) + Location::from_components(vec!["__Unknown__".into()]) }); // TODO: Get rid of these hacks if let Some("CGFloat" | "CGPoint" | "CGRect" | "CGSize") = name.to_option() { - location = - Location::from_components(vec!["Foundation".to_string(), "NSGeometry".to_string()]); + location = Location::from_components(vec!["Foundation".into(), "NSGeometry".into()]); } if let Some("CFTimeInterval") = name.to_option() { - location = Location::from_components(vec!["System".to_string()]); + location = Location::from_components(vec!["System".into()]); } Self { name, location } @@ -233,6 +263,10 @@ impl ItemIdentifier { &self.location } + pub fn into_location(self) -> Location { + self.location + } + pub fn with_new_path(self, other: &ItemIdentifier) -> Self { Self { name: self.name, @@ -252,7 +286,7 @@ impl ItemIdentifier { } pub fn is_nsobject(&self) -> bool { - self.library_name() == "System" + self.library_name() == "objc2" && (self.name == "NSObject" || self.name == "NSObjectProtocol") } @@ -262,33 +296,44 @@ impl ItemIdentifier { pub fn nserror() -> Self { Self { - name: "NSError".to_string(), - location: Location::from_components(vec![ - "Foundation".to_string(), - "NSError".to_string(), - ]), + name: "NSError".into(), + location: Location::from_components(vec!["Foundation".into(), "NSError".into()]), } } pub fn block() -> Self { Self { - name: "Block".to_string(), - location: Location::from_components(vec!["block2".to_string()]), + name: "Block".into(), + location: Location::from_components(vec!["block2".into()]), } } pub fn bitflags() -> Self { Self { - name: "bitflags".to_string(), - location: Location::from_components(vec!["bitflags".to_string()]), + name: "bitflags".into(), + location: Location::from_components(vec!["bitflags".into()]), + } + } + + pub fn objc2(name: impl Into) -> Self { + Self { + name: name.into(), + location: Location::from_components(vec!["objc2".into()]), + } + } + + pub fn main_thread_marker() -> Self { + Self { + name: "MainThreadMarker".into(), + location: Location::from_components(vec!["Foundation".into()]), } } #[cfg(test)] pub fn dummy() -> Self { Self { - name: "DUMMY".to_string(), - location: Location::from_components(vec!["System".to_string()]), + name: "DUMMY".into(), + location: Location::from_components(vec!["System".into()]), } } @@ -305,12 +350,11 @@ impl ItemIdentifier { impl fmt::Display for ItemIdentifierPath<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self.0.location.library() { - LocationLibrary::System => write!(f, "{}", self.0.name), - LocationLibrary::Bitflags => write!(f, "bitflags::{}", self.0.name), - LocationLibrary::Block2 => write!(f, "block2::{}", self.0.name), - LocationLibrary::Libc => write!(f, "libc::{}", self.0.name), - LocationLibrary::Library(_) => write!(f, "{}", self.0.name), + match self.0.location.library_name() { + "bitflags" => write!(f, "bitflags::{}", self.0.name), + "block2" => write!(f, "block2::{}", self.0.name), + "libc" => write!(f, "libc::{}", self.0.name), + _ => write!(f, "{}", self.0.name), } } } @@ -323,7 +367,7 @@ impl ItemIdentifier { impl fmt::Display for ItemIdentifierPathInRelationTo<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if self.1.path_components.last() == self.0.location.path_components.last() { + if self.1.file_name() == self.0.location.file_name() { write!(f, "{}", self.0.name) } else { write!(f, "{}", self.0.path()) @@ -373,11 +417,19 @@ pub fn cfg_gate_ln, I: AsRef>( // a consistent order. let mut feature_names: BTreeSet = required_features .into_iter() - .filter_map(|id| id.as_ref().feature(config, emission_location)) + .filter_map(|id| { + id.as_ref() + .library(config, emission_location.library_name()) + .feature() + }) .collect(); for location in implied_features { - if let Some(feature_name) = location.as_ref().feature(config, emission_location) { + if let Some(feature_name) = location + .as_ref() + .library(config, emission_location.library_name()) + .feature() + { feature_names.remove(&feature_name); } } diff --git a/crates/header-translator/src/library.rs b/crates/header-translator/src/library.rs index 260733e56..0c37756d0 100644 --- a/crates/header-translator/src/library.rs +++ b/crates/header-translator/src/library.rs @@ -198,17 +198,12 @@ see that for related crates.", self.data.krate, self.link_name)?; let mut dependencies: BTreeMap<_, _> = self .module - .crates(config, &self.link_name) + .all_items() .into_iter() - .chain(self.data.required_dependencies.iter().map(|krate| &**krate)) - .map(|krate| { - ( - krate, - ( - self.data.required_dependencies.contains(krate), - >::new(), - ), - ) + .flat_map(|item| { + let lib = item.location().library(config, &self.link_name); + lib.krate() + .map(|(krate, required)| (krate, (required, BTreeSet::new()))) }) .collect(); @@ -216,7 +211,10 @@ see that for related crates.", self.data.krate, self.link_name)?; for stmt in &self.module.stmts { for required_item in stmt.required_items_inner() { let location = required_item.location(); - if let Some(feature) = location.cargo_toml_feature(config, &self.link_name) { + if let Some(feature) = location + .library(config, &self.link_name) + .cargo_toml_feature() + { if feature == "bitflags" { if let Some((bitflags_required, _)) = dependencies.get_mut("bitflags") { *bitflags_required = true; @@ -236,6 +234,10 @@ see that for related crates.", self.data.krate, self.link_name)?; for (krate, (required, features)) in &dependencies { let mut table = match *krate { + "objc2" => InlineTable::from_iter([ + ("path", Value::from("../../crates/objc2".to_string())), + ("version", Value::from("0.5.1")), + ]), "block2" => InlineTable::from_iter([ ("path", Value::from("../../crates/block2".to_string())), ("version", Value::from("0.5.0")), @@ -249,9 +251,7 @@ see that for related crates.", self.data.krate, self.link_name)?; ("version", Value::from(VERSION)), ]), }; - if self.data.gnustep && *krate != "libc" && *krate != "bitflags" { - table.insert("default-features", Value::from(false)); - } + table.insert("default-features", Value::from(false)); if !required { table.insert("optional", Value::from(true)); } @@ -266,6 +266,23 @@ see that for related crates.", self.data.krate, self.link_name)?; .unwrap() .entry(krate) .or_insert(Item::Value(Value::InlineTable(table))); + + cargo_toml["features"]["std"] + .as_array_mut() + .unwrap() + .push(Value::from(format!( + "{krate}{}/std", + if *required { "" } else { "?" }, + ))); + if *krate != "bitflags" && *krate != "libc" { + cargo_toml["features"]["alloc"] + .as_array_mut() + .unwrap() + .push(Value::from(format!( + "{krate}{}/alloc", + if *required { "" } else { "?" }, + ))); + } } match fs::read_to_string(crate_dir.join("Cargo.modified.toml")) { diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 00404b352..fe22a92ae 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -286,7 +286,7 @@ fn parse_sdk( .map(|(name, data)| (name.into(), Library::new(name, data))) .collect(); - let mut library_span: Option<(_, _)> = None; + let mut library_span: Option<(_, String)> = None; let mut file_span: Option<(_, _)> = None; let mut context = Context::new(config, sdk); @@ -295,10 +295,10 @@ fn parse_sdk( let _span = trace_span!("entity", ?entity).entered(); if let Some(location) = context.get_location(&entity) { let library_name = location.library_name(); - if library_span.as_ref().map(|(_, s)| s) != Some(library_name) { + if library_span.as_ref().map(|(_, s)| &**s) != Some(library_name) { library_span = Some(( debug_span!("library", name = library_name).entered(), - library_name.clone(), + library_name.to_string(), )); file_span.take(); } diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 730633882..9b374d493 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -663,6 +663,9 @@ impl Method { if self.is_error { items.push(ItemIdentifier::nserror()); } + if self.mainthreadonly { + items.push(ItemIdentifier::main_thread_marker()); + } items } } diff --git a/crates/header-translator/src/module.rs b/crates/header-translator/src/module.rs index d8358ee31..f1f8b5393 100644 --- a/crates/header-translator/src/module.rs +++ b/crates/header-translator/src/module.rs @@ -6,7 +6,7 @@ use std::{fmt, fs}; use crate::display_helper::FormatterFn; use crate::id::{cfg_gate_ln, Location}; use crate::stmt::Stmt; -use crate::Config; +use crate::{Config, ItemIdentifier}; #[derive(Default, Debug, PartialEq)] pub struct Module { @@ -28,27 +28,14 @@ impl Module { self.stmts.push(stmt); } - pub fn imports<'c>(&self, config: &'c Config, emission_library: &str) -> BTreeSet<&'c str> { + pub fn all_items(&self) -> BTreeSet { self.stmts .iter() .flat_map(|stmt| stmt.required_items_inner()) - .filter(|item| item.library_name() != emission_library) - // Ignore crate imports for required items from unknown crates - .filter_map(|item| item.location().import(config)) - .collect() - } - - pub fn crates<'c>(&self, config: &'c Config, emission_library: &str) -> BTreeSet<&'c str> { - self.stmts - .iter() - .flat_map(|stmt| stmt.required_items_inner()) - .filter(|item| item.library_name() != emission_library) - // Ignore crate imports for required items from unknown crates - .filter_map(|item| item.location().krate(config)) .chain( self.submodules .values() - .flat_map(|module| module.crates(config, emission_library)), + .flat_map(|module| module.all_items()), ) .collect() } @@ -67,7 +54,10 @@ impl Module { for stmt in &module.stmts { for required_item in stmt.required_items_inner() { let location = required_item.location(); - if let Some(feature) = location.cargo_toml_feature(config, emission_library) { + if let Some(feature) = location + .library(config, emission_library) + .cargo_toml_feature() + { // Feature names are based on the file name, not the // whole path to the feature. features.insert(feature); @@ -88,21 +78,14 @@ impl Module { emission_library: &'a str, ) -> impl fmt::Display + 'a { FormatterFn(move |f| { - writeln!(f, "use objc2::__framework_prelude::*;")?; - - let mut imports = self.imports(config, emission_library); - // TODO: Remove this once MainThreadMarker is moved to objc2 - imports.extend( - config.libraries[emission_library] - .required_dependencies - .iter() - .map(|krate| &**krate), - ); - - for krate in imports { - let required = config.libraries[emission_library] - .required_dependencies - .contains(krate); + let imports: BTreeMap<_, _> = self + .stmts + .iter() + .flat_map(|stmt| stmt.required_items_inner()) + .filter_map(|item| item.location().library(config, emission_library).import()) + .collect(); + + for (krate, required) in imports { if !required { writeln!(f, "#[cfg(feature = {:?})]", krate)?; } @@ -185,7 +168,7 @@ impl Module { write!(f, "{}", self.modules(config))?; } - if !self.stmts.is_empty() || self.submodules.is_empty() { + if !self.stmts.is_empty() { write!(f, "{}", self.stmts(config, emission_library))?; } diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 88446d83f..15451a728 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -256,48 +256,71 @@ pub enum Primitive { NSUInteger, } -impl fmt::Display for Primitive { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +impl Primitive { + fn required_items(&self) -> Vec { + let s = self.as_str(); + match self { + Self::ObjcBool => vec![ItemIdentifier::objc2("Bool")], + Self::NSInteger => vec![ItemIdentifier::objc2("NSInteger")], + Self::NSUInteger => vec![ItemIdentifier::objc2("NSUInteger")], + _ => { + if s.starts_with("c_") { + // Temporary, until we can import these by themselves + vec![ItemIdentifier::objc2(s)] + } else { + vec![] + } + } + } + } + + const fn as_str(&self) -> &'static str { match self { // Primitives - Self::Void => write!(f, "c_void"), - Self::C99Bool => write!(f, "bool"), - Self::Char => write!(f, "c_char"), - Self::SChar => write!(f, "c_schar"), - Self::UChar => write!(f, "c_uchar"), - Self::Short => write!(f, "c_short"), - Self::UShort => write!(f, "c_ushort"), - Self::Int => write!(f, "c_int"), - Self::UInt => write!(f, "c_uint"), - Self::Long => write!(f, "c_long"), - Self::ULong => write!(f, "c_ulong"), - Self::LongLong => write!(f, "c_longlong"), - Self::ULongLong => write!(f, "c_ulonglong"), - Self::Float => write!(f, "c_float"), - Self::Double => write!(f, "c_double"), - Self::F32 => write!(f, "f32"), - Self::F64 => write!(f, "f64"), - Self::I8 => write!(f, "i8"), - Self::U8 => write!(f, "u8"), - Self::I16 => write!(f, "i16"), - Self::U16 => write!(f, "u16"), - Self::I32 => write!(f, "i32"), - Self::U32 => write!(f, "u32"), - Self::I64 => write!(f, "i64"), - Self::U64 => write!(f, "u64"), + Self::Void => "c_void", + Self::C99Bool => "bool", + Self::Char => "c_char", + Self::SChar => "c_schar", + Self::UChar => "c_uchar", + Self::Short => "c_short", + Self::UShort => "c_ushort", + Self::Int => "c_int", + Self::UInt => "c_uint", + Self::Long => "c_long", + Self::ULong => "c_ulong", + Self::LongLong => "c_longlong", + Self::ULongLong => "c_ulonglong", + Self::Float => "c_float", + Self::Double => "c_double", + Self::F32 => "f32", + Self::F64 => "f64", + Self::I8 => "i8", + Self::U8 => "u8", + Self::I16 => "i16", + Self::U16 => "u16", + Self::I32 => "i32", + Self::U32 => "u32", + Self::I64 => "i64", + Self::U64 => "u64", // TODO: Use core::ffi::c_ssize_t - Self::ISize => write!(f, "isize"), + Self::ISize => "isize", // TODO: Use core::ffi::c_size_t - Self::USize => write!(f, "usize"), + Self::USize => "usize", // TODO: Use core::ffi::c_ptr_diff_t - Self::PtrDiff => write!(f, "isize"), - Self::ObjcBool => write!(f, "Bool"), - Self::NSInteger => write!(f, "NSInteger"), - Self::NSUInteger => write!(f, "NSUInteger"), + Self::PtrDiff => "isize", + Self::ObjcBool => "Bool", + Self::NSInteger => "NSInteger", + Self::NSUInteger => "NSUInteger", } } } +impl fmt::Display for Primitive { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.as_str()) + } +} + /// A reference to a class or a protocol declaration. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ItemRef { @@ -307,6 +330,10 @@ pub struct ItemRef { } impl ItemRef { + fn required_items(&self) -> Vec { + self.required_items.clone() + } + fn new(entity: &Entity<'_>, context: &Context<'_>) -> Self { Self { id: ItemIdentifier::new(entity, context), @@ -993,34 +1020,34 @@ impl Ty { pub(crate) fn required_items(&self) -> Vec { match self { - Self::Primitive(_) => Vec::new(), + Self::Primitive(prim) => prim.required_items(), Self::Class { decl, generics, protocols, } => { - let mut items = decl.required_items.clone(); + let mut items = decl.required_items(); for generic in generics { items.extend(generic.required_items()); } for protocol in protocols { - items.extend(protocol.required_items.clone()); + items.extend(protocol.required_items()); } items } Self::GenericParam { .. } => Vec::new(), Self::AnyObject { protocols } => { - let mut items = Vec::new(); + let mut items = vec![ItemIdentifier::objc2("AnyObject")]; for protocol in protocols { - items.extend(protocol.required_items.clone()); + items.extend(protocol.required_items()); } items } - Self::AnyProtocol => Vec::new(), + Self::AnyProtocol => vec![ItemIdentifier::objc2("AnyProtocol")], Self::AnyClass { protocols } => { - let mut items = Vec::new(); + let mut items = vec![ItemIdentifier::objc2("AnyClass")]; for protocol in protocols { - items.extend(protocol.required_items.clone()); + items.extend(protocol.required_items()); } items } @@ -1028,12 +1055,36 @@ impl Ty { // `Self` is always available there, and don't required additional // imports, cfgs or other such things. Self::Self_ => Vec::new(), - Self::Sel { .. } => Vec::new(), - Self::Pointer { pointee, .. } => pointee.required_items(), - Self::IncompleteArray { pointee, .. } => pointee.required_items(), - Self::TypeDef { id, to, .. } => { + Self::Sel { .. } => vec![ItemIdentifier::objc2("Sel")], + Self::Pointer { + pointee, + nullability, + .. + } + | Self::IncompleteArray { + pointee, + nullability, + .. + } => { + let mut items = pointee.required_items(); + // Temporary + if *nullability == Nullability::NonNull { + items.push(ItemIdentifier::objc2("NonNull")); + } + items + } + Self::TypeDef { + id, + to, + nullability, + .. + } => { let mut items = to.required_items(); items.push(id.clone()); + // Temporary + if *nullability == Nullability::NonNull { + items.push(ItemIdentifier::objc2("NonNull")); + } items } Self::Array { element_type, .. } => element_type.required_items(), diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index f81573add..41cc05d1b 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -288,7 +288,7 @@ pub(crate) fn items_required_by_decl( ) -> Vec { let id = ItemIdentifier::new(entity, context); - let mut items = Vec::new(); + let mut items = vec![ItemIdentifier::objc2("__macros__")]; match entity.get_kind() { EntityKind::ObjCInterfaceDecl => { @@ -1480,7 +1480,7 @@ impl Stmt { } => cls_required_items.clone(), // Intentionally doesn't require anything, the impl itself is // cfg-gated - Self::ExternCategory { .. } => Vec::new(), + Self::ExternCategory { .. } => vec![ItemIdentifier::objc2("__macros__")], Self::ProtocolDecl { required_items, .. } => required_items.clone(), Self::ProtocolImpl { cls_required_items, @@ -1497,10 +1497,15 @@ impl Stmt { for (_, field_ty) in fields { items.extend(field_ty.required_items()); } + items.push(ItemIdentifier::objc2("Encoding")); items } // Variants manage required items themselves - Self::EnumDecl { ty, .. } => ty.required_items(), + Self::EnumDecl { ty, .. } => { + let mut items = ty.required_items(); + items.push(ItemIdentifier::objc2("Encoding")); + items + } Self::ConstDecl { ty, value, .. } => { let mut items = ty.required_items(); items.extend(value.required_items()); diff --git a/framework-crates/objc2-accessibility/Cargo.toml b/framework-crates/objc2-accessibility/Cargo.toml index d904531e8..ded0ff42d 100644 --- a/framework-crates/objc2-accessibility/Cargo.toml +++ b/framework-crates/objc2-accessibility/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] diff --git a/framework-crates/objc2-accounts/Cargo.toml b/framework-crates/objc2-accounts/Cargo.toml index eef0bed1d..753bba076 100644 --- a/framework-crates/objc2-accounts/Cargo.toml +++ b/framework-crates/objc2-accounts/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] ACAccount = ["objc2-foundation/NSString"] diff --git a/framework-crates/objc2-ad-services/Cargo.toml b/framework-crates/objc2-ad-services/Cargo.toml index 89cc5b6bb..a7ce5a2b2 100644 --- a/framework-crates/objc2-ad-services/Cargo.toml +++ b/framework-crates/objc2-ad-services/Cargo.toml @@ -22,7 +22,7 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] AAAttribution = [ "objc2-foundation/NSError", diff --git a/framework-crates/objc2-ad-support/Cargo.toml b/framework-crates/objc2-ad-support/Cargo.toml index 7d5b6aee8..827b6fd6b 100644 --- a/framework-crates/objc2-ad-support/Cargo.toml +++ b/framework-crates/objc2-ad-support/Cargo.toml @@ -22,7 +22,7 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] ASIdentifierManager = ["objc2-foundation/NSUUID"] all = ["ASIdentifierManager"] diff --git a/framework-crates/objc2-app-kit/Cargo.modified.toml b/framework-crates/objc2-app-kit/Cargo.modified.toml index eee621402..e5e3f1d4b 100644 --- a/framework-crates/objc2-app-kit/Cargo.modified.toml +++ b/framework-crates/objc2-app-kit/Cargo.modified.toml @@ -1,14 +1,4 @@ -[dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } - [features] -default = ["std"] - -# Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std", "objc2-core-data?/std", "objc2-quartz-core?/std"] -alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc", "objc2-core-data?/alloc", "objc2-quartz-core?/alloc"] - # Deprecated; this is the default on Apple platforms, and not applicable on other platforms. apple = [] diff --git a/framework-crates/objc2-app-kit/Cargo.toml b/framework-crates/objc2-app-kit/Cargo.toml index ac40e0796..e10cb02c1 100644 --- a/framework-crates/objc2-app-kit/Cargo.toml +++ b/framework-crates/objc2-app-kit/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } +bitflags = { version = "2.5.0", default-features = false, optional = true } block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } -libc = { version = "0.2.80", optional = true } +libc = { version = "0.2.80", default-features = false, optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } objc2-core-data = { path = "../objc2-core-data", version = "0.2.0", default-features = false, optional = true } objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", default-features = false, optional = true } objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } @@ -45,8 +45,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std", "objc2-core-data?/std", "objc2-quartz-core?/std"] -alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc", "objc2-core-data?/alloc", "objc2-quartz-core?/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "libc?/std", "objc2/std", "objc2-core-data?/std", "objc2-core-image?/std", "objc2-foundation/std", "objc2-quartz-core?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-core-data?/alloc", "objc2-core-image?/alloc", "objc2-foundation/alloc", "objc2-quartz-core?/alloc"] apple = [] gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7", "objc2-core-data?/gnustep-1-7", "objc2-quartz-core?/gnustep-1-7"] gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8", "objc2-core-data?/gnustep-1-8", "objc2-quartz-core?/gnustep-1-8"] diff --git a/framework-crates/objc2-app-tracking-transparency/Cargo.toml b/framework-crates/objc2-app-tracking-transparency/Cargo.toml index c33dc9b97..8abed13dc 100644 --- a/framework-crates/objc2-app-tracking-transparency/Cargo.toml +++ b/framework-crates/objc2-app-tracking-transparency/Cargo.toml @@ -21,9 +21,8 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std"] +alloc = ["block2?/alloc", "objc2/alloc"] block2 = ["dep:block2"] ATTrackingManager = [] diff --git a/framework-crates/objc2-authentication-services/Cargo.toml b/framework-crates/objc2-authentication-services/Cargo.toml index 6be41d655..82f96c6fa 100644 --- a/framework-crates/objc2-authentication-services/Cargo.toml +++ b/framework-crates/objc2-authentication-services/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] diff --git a/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml b/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml index 62233adae..cf43fbb22 100644 --- a/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml +++ b/framework-crates/objc2-automatic-assessment-configuration/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] AEAssessmentApplication = [ diff --git a/framework-crates/objc2-automator/Cargo.toml b/framework-crates/objc2-automator/Cargo.toml index 181927629..f88c6cdc9 100644 --- a/framework-crates/objc2-automator/Cargo.toml +++ b/framework-crates/objc2-automator/Cargo.toml @@ -22,9 +22,9 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-osa-kit = { path = "../objc2-osa-kit", version = "0.2.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-osa-kit = { path = "../objc2-osa-kit", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std", "objc2-osa-kit?/std"] +alloc = ["objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc", "objc2-osa-kit?/alloc"] objc2-app-kit = ["dep:objc2-app-kit"] objc2-osa-kit = ["dep:objc2-osa-kit"] diff --git a/framework-crates/objc2-av-kit/Cargo.toml b/framework-crates/objc2-av-kit/Cargo.toml index ebf21b4f8..f2adc4567 100644 --- a/framework-crates/objc2-av-kit/Cargo.toml +++ b/framework-crates/objc2-av-kit/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-background-assets/Cargo.toml b/framework-crates/objc2-background-assets/Cargo.toml index ce69fa394..871554eb0 100644 --- a/framework-crates/objc2-background-assets/Cargo.toml +++ b/framework-crates/objc2-background-assets/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] BAAppExtensionInfo = [ diff --git a/framework-crates/objc2-background-tasks/Cargo.toml b/framework-crates/objc2-background-tasks/Cargo.toml index dbadb4348..24575375a 100644 --- a/framework-crates/objc2-background-tasks/Cargo.toml +++ b/framework-crates/objc2-background-tasks/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-ios" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] BGDefines = [] diff --git a/framework-crates/objc2-business-chat/Cargo.toml b/framework-crates/objc2-business-chat/Cargo.toml index dd58207a0..5d0ab2a5d 100644 --- a/framework-crates/objc2-business-chat/Cargo.toml +++ b/framework-crates/objc2-business-chat/Cargo.toml @@ -22,8 +22,8 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-app-kit/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-app-kit/alloc", "objc2-foundation/alloc"] BCChatAction = [ "objc2-foundation/NSDictionary", diff --git a/framework-crates/objc2-call-kit/Cargo.toml b/framework-crates/objc2-call-kit/Cargo.toml index f155da296..931019675 100644 --- a/framework-crates/objc2-call-kit/Cargo.toml +++ b/framework-crates/objc2-call-kit/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] CXAction = [ diff --git a/framework-crates/objc2-class-kit/Cargo.toml b/framework-crates/objc2-class-kit/Cargo.toml index 5877ddc76..99adb51ae 100644 --- a/framework-crates/objc2-class-kit/Cargo.toml +++ b/framework-crates/objc2-class-kit/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] CLSActivity = [ diff --git a/framework-crates/objc2-cloud-kit/Cargo.toml b/framework-crates/objc2-cloud-kit/Cargo.toml index 953dc8da1..41b6c02d0 100644 --- a/framework-crates/objc2-cloud-kit/Cargo.toml +++ b/framework-crates/objc2-cloud-kit/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-core-location?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-core-location = ["dep:objc2-core-location"] diff --git a/framework-crates/objc2-contacts-ui/Cargo.toml b/framework-crates/objc2-contacts-ui/Cargo.toml index f4ee1faa3..8e32c61b7 100644 --- a/framework-crates/objc2-contacts-ui/Cargo.toml +++ b/framework-crates/objc2-contacts-ui/Cargo.toml @@ -22,9 +22,9 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-app-kit?/std", "objc2-contacts?/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-app-kit?/alloc", "objc2-contacts?/alloc", "objc2-foundation/alloc"] objc2-app-kit = ["dep:objc2-app-kit"] objc2-contacts = ["dep:objc2-contacts"] diff --git a/framework-crates/objc2-contacts/Cargo.toml b/framework-crates/objc2-contacts/Cargo.toml index f4ff6aaa8..a0ec15692 100644 --- a/framework-crates/objc2-contacts/Cargo.toml +++ b/framework-crates/objc2-contacts/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] CNChangeHistoryEvent = [ diff --git a/framework-crates/objc2-core-bluetooth/Cargo.toml b/framework-crates/objc2-core-bluetooth/Cargo.toml index 5f938b3b5..6f51657f8 100644 --- a/framework-crates/objc2-core-bluetooth/Cargo.toml +++ b/framework-crates/objc2-core-bluetooth/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] CBATTRequest = ["objc2-foundation/NSData"] diff --git a/framework-crates/objc2-core-data/Cargo.modified.toml b/framework-crates/objc2-core-data/Cargo.modified.toml index 3ba8674b4..426b1e1a1 100644 --- a/framework-crates/objc2-core-data/Cargo.modified.toml +++ b/framework-crates/objc2-core-data/Cargo.modified.toml @@ -1,14 +1,4 @@ -[dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } - [features] -default = ["std"] - -# Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std"] -alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc"] - # Deprecated; this is the default on Apple platforms, and not applicable on other platforms. apple = [] diff --git a/framework-crates/objc2-core-data/Cargo.toml b/framework-crates/objc2-core-data/Cargo.toml index a9a491820..ec3fa622b 100644 --- a/framework-crates/objc2-core-data/Cargo.toml +++ b/framework-crates/objc2-core-data/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } +bitflags = { version = "2.5.0", default-features = false, optional = true } block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] @@ -44,8 +44,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std"] -alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] apple = [] gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7"] gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8"] diff --git a/framework-crates/objc2-core-image/Cargo.modified.toml b/framework-crates/objc2-core-image/Cargo.modified.toml index bf7135929..426b1e1a1 100644 --- a/framework-crates/objc2-core-image/Cargo.modified.toml +++ b/framework-crates/objc2-core-image/Cargo.modified.toml @@ -1,7 +1,3 @@ -[dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } - [features] # Deprecated; this is the default on Apple platforms, and not applicable on other platforms. apple = [] diff --git a/framework-crates/objc2-core-image/Cargo.toml b/framework-crates/objc2-core-image/Cargo.toml index 14dc8e501..11f72d6c7 100644 --- a/framework-crates/objc2-core-image/Cargo.toml +++ b/framework-crates/objc2-core-image/Cargo.toml @@ -21,8 +21,8 @@ license = "MIT" workspace = true [dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } objc2-metal = { path = "../objc2-metal", version = "0.2.0", default-features = false, optional = true } @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std", "objc2-metal?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc", "objc2-metal?/alloc"] apple = [] gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7"] gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8"] diff --git a/framework-crates/objc2-core-location/Cargo.toml b/framework-crates/objc2-core-location/Cargo.toml index 6f859b18b..d774358c0 100644 --- a/framework-crates/objc2-core-location/Cargo.toml +++ b/framework-crates/objc2-core-location/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-contacts?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-contacts?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-contacts = ["dep:objc2-contacts"] diff --git a/framework-crates/objc2-core-ml/Cargo.toml b/framework-crates/objc2-core-ml/Cargo.toml index 712bbaf11..38d0ec30e 100644 --- a/framework-crates/objc2-core-ml/Cargo.toml +++ b/framework-crates/objc2-core-ml/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-metal = { path = "../objc2-metal", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-metal = { path = "../objc2-metal", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std", "objc2-metal?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc", "objc2-metal?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-metal = ["dep:objc2-metal"] diff --git a/framework-crates/objc2-core-motion/Cargo.toml b/framework-crates/objc2-core-motion/Cargo.toml index 9c6cb7830..fc831f5fa 100644 --- a/framework-crates/objc2-core-motion/Cargo.toml +++ b/framework-crates/objc2-core-motion/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-core-location?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-core-location = ["dep:objc2-core-location"] diff --git a/framework-crates/objc2-core-wlan/Cargo.toml b/framework-crates/objc2-core-wlan/Cargo.toml index f0be5bd54..c5505f881 100644 --- a/framework-crates/objc2-core-wlan/Cargo.toml +++ b/framework-crates/objc2-core-wlan/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] CWChannel = ["objc2-foundation/NSObject"] diff --git a/framework-crates/objc2-data-detection/Cargo.toml b/framework-crates/objc2-data-detection/Cargo.toml index 21ca5b721..fc266cbf9 100644 --- a/framework-crates/objc2-data-detection/Cargo.toml +++ b/framework-crates/objc2-data-detection/Cargo.toml @@ -22,7 +22,7 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] DDMatch = [ "objc2-foundation/NSDate", diff --git a/framework-crates/objc2-device-check/Cargo.toml b/framework-crates/objc2-device-check/Cargo.toml index 6d950f4a0..7b15bba5d 100644 --- a/framework-crates/objc2-device-check/Cargo.toml +++ b/framework-crates/objc2-device-check/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] DCAppAttestService = [ diff --git a/framework-crates/objc2-event-kit/Cargo.toml b/framework-crates/objc2-event-kit/Cargo.toml index 3c5250ee4..ac6256984 100644 --- a/framework-crates/objc2-event-kit/Cargo.toml +++ b/framework-crates/objc2-event-kit/Cargo.toml @@ -21,13 +21,13 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-map-kit = { path = "../objc2-map-kit", version = "0.2.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-map-kit = { path = "../objc2-map-kit", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -44,8 +44,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-core-location?/std", "objc2-foundation/std", "objc2-map-kit?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc", "objc2-map-kit?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-exception-handling/Cargo.toml b/framework-crates/objc2-exception-handling/Cargo.toml index ca86f0674..60b43ed32 100644 --- a/framework-crates/objc2-exception-handling/Cargo.toml +++ b/framework-crates/objc2-exception-handling/Cargo.toml @@ -22,7 +22,7 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -37,8 +37,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] ExceptionHandlingDefines = [] NSExceptionHandler = [ diff --git a/framework-crates/objc2-extension-kit/Cargo.toml b/framework-crates/objc2-extension-kit/Cargo.toml index 9710094dd..dd53ddb01 100644 --- a/framework-crates/objc2-extension-kit/Cargo.toml +++ b/framework-crates/objc2-extension-kit/Cargo.toml @@ -22,8 +22,8 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] objc2-app-kit = ["dep:objc2-app-kit"] EXAppExtensionBrowserViewController = [ diff --git a/framework-crates/objc2-external-accessory/Cargo.toml b/framework-crates/objc2-external-accessory/Cargo.toml index 4922014d0..3a8984c93 100644 --- a/framework-crates/objc2-external-accessory/Cargo.toml +++ b/framework-crates/objc2-external-accessory/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] diff --git a/framework-crates/objc2-file-provider-ui/Cargo.toml b/framework-crates/objc2-file-provider-ui/Cargo.toml index e7fa8e452..5e35d7557 100644 --- a/framework-crates/objc2-file-provider-ui/Cargo.toml +++ b/framework-crates/objc2-file-provider-ui/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-file-provider = { path = "../objc2-file-provider", version = "0.2.0" } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-file-provider = { path = "../objc2-file-provider", version = "0.2.0", default-features = false } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-file-provider/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-file-provider/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-file-provider/Cargo.toml b/framework-crates/objc2-file-provider/Cargo.toml index 28784493a..9d3547ce4 100644 --- a/framework-crates/objc2-file-provider/Cargo.toml +++ b/framework-crates/objc2-file-provider/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std", "objc2-uniform-type-identifiers?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc", "objc2-uniform-type-identifiers?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-uniform-type-identifiers = ["dep:objc2-uniform-type-identifiers"] diff --git a/framework-crates/objc2-finder-sync/Cargo.toml b/framework-crates/objc2-finder-sync/Cargo.toml index 26dc8f7dc..d8c3c4d4a 100644 --- a/framework-crates/objc2-finder-sync/Cargo.toml +++ b/framework-crates/objc2-finder-sync/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true, features = ["NSImage", "NSMenu"] } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", features = ["NSArray", "NSData", "NSDate", "NSDictionary", "NSError", "NSExtensionContext", "NSExtensionRequestHandling", "NSFileManager", "NSSet", "NSString", "NSURL", "NSXPCConnection"] } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true, features = ["NSImage", "NSMenu"] } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false, features = ["NSArray", "NSData", "NSDate", "NSDictionary", "NSError", "NSExtensionContext", "NSExtensionRequestHandling", "NSFileManager", "NSSet", "NSString", "NSURL", "NSXPCConnection"] } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-foundation/Cargo.modified.toml b/framework-crates/objc2-foundation/Cargo.modified.toml index ec8eafbe9..2179edeed 100644 --- a/framework-crates/objc2-foundation/Cargo.modified.toml +++ b/framework-crates/objc2-foundation/Cargo.modified.toml @@ -1,7 +1,5 @@ [dependencies] dispatch = { version = "0.2.0", optional = true } -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } [dev-dependencies] static_assertions = "1.1.0" @@ -27,12 +25,6 @@ required-features = [ ] [features] -default = ["std"] - -# Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std"] -alloc = ["objc2/alloc", "block2?/alloc"] - # Deprecated; this is the default on Apple platforms, and not applicable on other platforms. apple = [] diff --git a/framework-crates/objc2-foundation/Cargo.toml b/framework-crates/objc2-foundation/Cargo.toml index 716382493..146d921b7 100644 --- a/framework-crates/objc2-foundation/Cargo.toml +++ b/framework-crates/objc2-foundation/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } +bitflags = { version = "2.5.0", default-features = false, optional = true } block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } -libc = { version = "0.2.80", optional = true } +libc = { version = "0.2.80", default-features = false, optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } dispatch = { version = "0.2.0", optional = true } [package.metadata.docs.rs] @@ -45,8 +45,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std"] -alloc = ["objc2/alloc", "block2?/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "libc?/std", "objc2/std"] +alloc = ["block2?/alloc", "objc2/alloc"] apple = [] gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7"] gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8"] diff --git a/framework-crates/objc2-game-controller/Cargo.toml b/framework-crates/objc2-game-controller/Cargo.toml index 20b26cba9..fb8a53816 100644 --- a/framework-crates/objc2-game-controller/Cargo.toml +++ b/framework-crates/objc2-game-controller/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-game-kit/Cargo.toml b/framework-crates/objc2-game-kit/Cargo.toml index 0ad4a5bfb..a6133f7d6 100644 --- a/framework-crates/objc2-game-kit/Cargo.toml +++ b/framework-crates/objc2-game-kit/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-health-kit/Cargo.toml b/framework-crates/objc2-health-kit/Cargo.toml index 73cb958dc..ed34db0cd 100644 --- a/framework-crates/objc2-health-kit/Cargo.toml +++ b/framework-crates/objc2-health-kit/Cargo.toml @@ -21,12 +21,12 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-core-location?/std", "objc2-foundation/std", "objc2-uniform-type-identifiers?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc", "objc2-uniform-type-identifiers?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-core-location = ["dep:objc2-core-location"] diff --git a/framework-crates/objc2-identity-lookup/Cargo.toml b/framework-crates/objc2-identity-lookup/Cargo.toml index df1986035..8ae046485 100644 --- a/framework-crates/objc2-identity-lookup/Cargo.toml +++ b/framework-crates/objc2-identity-lookup/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] ILBase = [] diff --git a/framework-crates/objc2-input-method-kit/Cargo.toml b/framework-crates/objc2-input-method-kit/Cargo.toml index 0c9f99cdd..1b0f43676 100644 --- a/framework-crates/objc2-input-method-kit/Cargo.toml +++ b/framework-crates/objc2-input-method-kit/Cargo.toml @@ -22,8 +22,8 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] objc2-app-kit = ["dep:objc2-app-kit"] IMKCandidates = [ diff --git a/framework-crates/objc2-link-presentation/Cargo.toml b/framework-crates/objc2-link-presentation/Cargo.toml index 9e7136a78..bf88206da 100644 --- a/framework-crates/objc2-link-presentation/Cargo.toml +++ b/framework-crates/objc2-link-presentation/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml b/framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml index 920e84ed2..2408085ee 100644 --- a/framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml +++ b/framework-crates/objc2-local-authentication-embedded-ui/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-local-authentication = { path = "../objc2-local-authentication", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-local-authentication = { path = "../objc2-local-authentication", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std", "objc2-local-authentication/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc", "objc2-local-authentication/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-local-authentication/Cargo.toml b/framework-crates/objc2-local-authentication/Cargo.toml index 3e022d9ea..0a0309a98 100644 --- a/framework-crates/objc2-local-authentication/Cargo.toml +++ b/framework-crates/objc2-local-authentication/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] LABase = [] diff --git a/framework-crates/objc2-mail-kit/Cargo.toml b/framework-crates/objc2-mail-kit/Cargo.toml index bc70c6592..0a11786ee 100644 --- a/framework-crates/objc2-mail-kit/Cargo.toml +++ b/framework-crates/objc2-mail-kit/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-map-kit/Cargo.toml b/framework-crates/objc2-map-kit/Cargo.toml index 484455989..0b0849976 100644 --- a/framework-crates/objc2-map-kit/Cargo.toml +++ b/framework-crates/objc2-map-kit/Cargo.toml @@ -21,13 +21,13 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-contacts = { path = "../objc2-contacts", version = "0.2.0", default-features = false, optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -45,8 +45,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-contacts?/std", "objc2-core-location?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-contacts?/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-media-player/Cargo.toml b/framework-crates/objc2-media-player/Cargo.toml index 92444d835..73468be0b 100644 --- a/framework-crates/objc2-media-player/Cargo.toml +++ b/framework-crates/objc2-media-player/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-metal-fx/Cargo.toml b/framework-crates/objc2-metal-fx/Cargo.toml index 36573376c..58eed87a5 100644 --- a/framework-crates/objc2-metal-fx/Cargo.toml +++ b/framework-crates/objc2-metal-fx/Cargo.toml @@ -22,8 +22,8 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-metal = { path = "../objc2-metal", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-metal = { path = "../objc2-metal", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std", "objc2-metal/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc", "objc2-metal/alloc"] MTLFXDefines = [] MTLFXSpatialScaler = [ diff --git a/framework-crates/objc2-metal-kit/Cargo.toml b/framework-crates/objc2-metal-kit/Cargo.toml index acccc562a..8defc1bec 100644 --- a/framework-crates/objc2-metal-kit/Cargo.toml +++ b/framework-crates/objc2-metal-kit/Cargo.toml @@ -21,12 +21,12 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-metal = { path = "../objc2-metal", version = "0.2.0" } -objc2-quartz-core = { path = "../objc2-quartz-core", version = "0.2.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-metal = { path = "../objc2-metal", version = "0.2.0", default-features = false } +objc2-quartz-core = { path = "../objc2-quartz-core", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std", "objc2-metal/std", "objc2-quartz-core?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc", "objc2-metal/alloc", "objc2-quartz-core?/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] objc2-quartz-core = ["dep:objc2-quartz-core"] diff --git a/framework-crates/objc2-metal/Cargo.toml b/framework-crates/objc2-metal/Cargo.toml index a009e1ede..851706415 100644 --- a/framework-crates/objc2-metal/Cargo.toml +++ b/framework-crates/objc2-metal/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] unstable-private = [ "objc2-foundation/NSString", "objc2-foundation/NSError", diff --git a/framework-crates/objc2-metric-kit/Cargo.toml b/framework-crates/objc2-metric-kit/Cargo.toml index e8ccf13a2..48f8d1cb2 100644 --- a/framework-crates/objc2-metric-kit/Cargo.toml +++ b/framework-crates/objc2-metric-kit/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +libc = { version = "0.2.80", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -libc = { version = "0.2.80", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "libc?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] libc = ["dep:libc"] MXAnimationMetric = [ diff --git a/framework-crates/objc2-ml-compute/Cargo.toml b/framework-crates/objc2-ml-compute/Cargo.toml index 32b6ab2ca..b2ffaaa22 100644 --- a/framework-crates/objc2-ml-compute/Cargo.toml +++ b/framework-crates/objc2-ml-compute/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-metal = { path = "../objc2-metal", version = "0.2.0", optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-metal = { path = "../objc2-metal", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std", "objc2-metal?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc", "objc2-metal?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-metal = ["dep:objc2-metal"] diff --git a/framework-crates/objc2-multipeer-connectivity/Cargo.toml b/framework-crates/objc2-multipeer-connectivity/Cargo.toml index 05e01775a..6c8125a73 100644 --- a/framework-crates/objc2-multipeer-connectivity/Cargo.toml +++ b/framework-crates/objc2-multipeer-connectivity/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-natural-language/Cargo.toml b/framework-crates/objc2-natural-language/Cargo.toml index e2340eaf9..c890a2610 100644 --- a/framework-crates/objc2-natural-language/Cargo.toml +++ b/framework-crates/objc2-natural-language/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] diff --git a/framework-crates/objc2-nearby-interaction/Cargo.toml b/framework-crates/objc2-nearby-interaction/Cargo.toml index 3c1e1dab8..3ee56f2b6 100644 --- a/framework-crates/objc2-nearby-interaction/Cargo.toml +++ b/framework-crates/objc2-nearby-interaction/Cargo.toml @@ -22,7 +22,7 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] NIAlgorithmConvergenceStatusReason = ["objc2-foundation/NSString"] NIConfiguration = [ diff --git a/framework-crates/objc2-network-extension/Cargo.toml b/framework-crates/objc2-network-extension/Cargo.toml index 346c6edcb..a97d8ac92 100644 --- a/framework-crates/objc2-network-extension/Cargo.toml +++ b/framework-crates/objc2-network-extension/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } +libc = { version = "0.2.80", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -libc = { version = "0.2.80", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "libc?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] libc = ["dep:libc"] diff --git a/framework-crates/objc2-osa-kit/Cargo.toml b/framework-crates/objc2-osa-kit/Cargo.toml index abf923e4d..0aea07629 100644 --- a/framework-crates/objc2-osa-kit/Cargo.toml +++ b/framework-crates/objc2-osa-kit/Cargo.toml @@ -21,10 +21,10 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0" } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "objc2/std", "objc2-app-kit/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-app-kit/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] OSALanguage = [ diff --git a/framework-crates/objc2-photos-ui/Cargo.toml b/framework-crates/objc2-photos-ui/Cargo.toml index c612a6010..8714a92b3 100644 --- a/framework-crates/objc2-photos-ui/Cargo.toml +++ b/framework-crates/objc2-photos-ui/Cargo.toml @@ -21,14 +21,14 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-map-kit = { path = "../objc2-map-kit", version = "0.2.0", optional = true } -objc2-photos = { path = "../objc2-photos", version = "0.2.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-map-kit = { path = "../objc2-map-kit", version = "0.2.0", default-features = false, optional = true } +objc2-photos = { path = "../objc2-photos", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -46,8 +46,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-core-location?/std", "objc2-foundation/std", "objc2-map-kit?/std", "objc2-photos?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc", "objc2-map-kit?/alloc", "objc2-photos?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-photos/Cargo.toml b/framework-crates/objc2-photos/Cargo.toml index bff9e8498..a1eb82b5c 100644 --- a/framework-crates/objc2-photos/Cargo.toml +++ b/framework-crates/objc2-photos/Cargo.toml @@ -21,14 +21,14 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", default-features = false, optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -46,8 +46,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-core-image?/std", "objc2-core-location?/std", "objc2-foundation/std", "objc2-uniform-type-identifiers?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-core-image?/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc", "objc2-uniform-type-identifiers?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-quartz-core/Cargo.modified.toml b/framework-crates/objc2-quartz-core/Cargo.modified.toml index b3eb0dcaa..2b7901538 100644 --- a/framework-crates/objc2-quartz-core/Cargo.modified.toml +++ b/framework-crates/objc2-quartz-core/Cargo.modified.toml @@ -1,17 +1,7 @@ [package] description = "Bindings to the QuartzCore/CoreAnimation framework" -[dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } - [features] -default = ["std"] - -# Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std"] -alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc"] - # Deprecated; this is the default on Apple platforms, and not applicable on other platforms. apple = [] diff --git a/framework-crates/objc2-quartz-core/Cargo.toml b/framework-crates/objc2-quartz-core/Cargo.toml index c6e895a5e..c44c13832 100644 --- a/framework-crates/objc2-quartz-core/Cargo.toml +++ b/framework-crates/objc2-quartz-core/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] -objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } +bitflags = { version = "2.5.0", default-features = false, optional = true } block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } +objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } objc2-metal = { path = "../objc2-metal", version = "0.2.0", default-features = false, optional = true } @@ -44,8 +44,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std", "block2?/std", "objc2-foundation/std"] -alloc = ["objc2/alloc", "block2?/alloc", "objc2-foundation/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-foundation/std", "objc2-metal?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc", "objc2-metal?/alloc"] apple = [] gnustep-1-7 = ["objc2/gnustep-1-7", "block2?/gnustep-1-7", "objc2-foundation/gnustep-1-7"] gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8", "block2?/gnustep-1-8", "objc2-foundation/gnustep-1-8"] diff --git a/framework-crates/objc2-screen-capture-kit/Cargo.toml b/framework-crates/objc2-screen-capture-kit/Cargo.toml index bf3751b05..51aff7ab4 100644 --- a/framework-crates/objc2-screen-capture-kit/Cargo.toml +++ b/framework-crates/objc2-screen-capture-kit/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } +libc = { version = "0.2.80", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -libc = { version = "0.2.80", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "libc?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] libc = ["dep:libc"] diff --git a/framework-crates/objc2-sensitive-content-analysis/Cargo.toml b/framework-crates/objc2-sensitive-content-analysis/Cargo.toml index a2303721c..36dfe607e 100644 --- a/framework-crates/objc2-sensitive-content-analysis/Cargo.toml +++ b/framework-crates/objc2-sensitive-content-analysis/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] SCSensitivityAnalyzer = [ diff --git a/framework-crates/objc2-service-management/Cargo.toml b/framework-crates/objc2-service-management/Cargo.toml index bdddda2a6..9b1fddeb6 100644 --- a/framework-crates/objc2-service-management/Cargo.toml +++ b/framework-crates/objc2-service-management/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -38,8 +38,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] SMAppService = [ diff --git a/framework-crates/objc2-social/Cargo.toml b/framework-crates/objc2-social/Cargo.toml index fd99e2b89..6d8513e6a 100644 --- a/framework-crates/objc2-social/Cargo.toml +++ b/framework-crates/objc2-social/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-accounts = { path = "../objc2-accounts", version = "0.2.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-accounts = { path = "../objc2-accounts", version = "0.2.0", default-features = false, optional = true } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-accounts?/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-accounts?/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-accounts = ["dep:objc2-accounts"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-sound-analysis/Cargo.toml b/framework-crates/objc2-sound-analysis/Cargo.toml index bd9f91399..43fa9b13e 100644 --- a/framework-crates/objc2-sound-analysis/Cargo.toml +++ b/framework-crates/objc2-sound-analysis/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] SNAnalyzer = [ diff --git a/framework-crates/objc2-speech/Cargo.toml b/framework-crates/objc2-speech/Cargo.toml index 5f6563be0..889af89e4 100644 --- a/framework-crates/objc2-speech/Cargo.toml +++ b/framework-crates/objc2-speech/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] SFErrors = [ diff --git a/framework-crates/objc2-store-kit/Cargo.toml b/framework-crates/objc2-store-kit/Cargo.toml index 98a6c21c5..3d45f6f25 100644 --- a/framework-crates/objc2-store-kit/Cargo.toml +++ b/framework-crates/objc2-store-kit/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-symbols/Cargo.toml b/framework-crates/objc2-symbols/Cargo.toml index 7a470b8b6..cc0fd3446 100644 --- a/framework-crates/objc2-symbols/Cargo.toml +++ b/framework-crates/objc2-symbols/Cargo.toml @@ -22,7 +22,7 @@ workspace = true [dependencies] objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -40,8 +40,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "objc2/std", "objc2-foundation/std"] +alloc = ["objc2/alloc", "objc2-foundation/alloc"] NSSymbolEffect = ["objc2-foundation/NSObject"] all = ["NSSymbolEffect"] diff --git a/framework-crates/objc2-ui-kit/Cargo.toml b/framework-crates/objc2-ui-kit/Cargo.toml index 7e04f3c64..5236238e6 100644 --- a/framework-crates/objc2-ui-kit/Cargo.toml +++ b/framework-crates/objc2-ui-kit/Cargo.toml @@ -21,19 +21,19 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-cloud-kit = { path = "../objc2-cloud-kit", version = "0.2.0", optional = true } -objc2-core-data = { path = "../objc2-core-data", version = "0.2.0", optional = true } -objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } -objc2-link-presentation = { path = "../objc2-link-presentation", version = "0.2.0", optional = true } -objc2-quartz-core = { path = "../objc2-quartz-core", version = "0.2.0", optional = true } -objc2-symbols = { path = "../objc2-symbols", version = "0.2.0", optional = true } -objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", optional = true } -objc2-user-notifications = { path = "../objc2-user-notifications", version = "0.2.0", optional = true } +objc2-cloud-kit = { path = "../objc2-cloud-kit", version = "0.2.0", default-features = false, optional = true } +objc2-core-data = { path = "../objc2-core-data", version = "0.2.0", default-features = false, optional = true } +objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", default-features = false, optional = true } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } +objc2-link-presentation = { path = "../objc2-link-presentation", version = "0.2.0", default-features = false, optional = true } +objc2-quartz-core = { path = "../objc2-quartz-core", version = "0.2.0", default-features = false, optional = true } +objc2-symbols = { path = "../objc2-symbols", version = "0.2.0", default-features = false, optional = true } +objc2-uniform-type-identifiers = { path = "../objc2-uniform-type-identifiers", version = "0.2.0", default-features = false, optional = true } +objc2-user-notifications = { path = "../objc2-user-notifications", version = "0.2.0", default-features = false, optional = true } [package.metadata.docs.rs] default-target = "aarch64-apple-ios" @@ -50,8 +50,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-cloud-kit?/std", "objc2-core-data?/std", "objc2-core-image?/std", "objc2-core-location?/std", "objc2-foundation/std", "objc2-link-presentation?/std", "objc2-quartz-core?/std", "objc2-symbols?/std", "objc2-uniform-type-identifiers?/std", "objc2-user-notifications?/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-cloud-kit?/alloc", "objc2-core-data?/alloc", "objc2-core-image?/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc", "objc2-link-presentation?/alloc", "objc2-quartz-core?/alloc", "objc2-symbols?/alloc", "objc2-uniform-type-identifiers?/alloc", "objc2-user-notifications?/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-cloud-kit = ["dep:objc2-cloud-kit"] diff --git a/framework-crates/objc2-uniform-type-identifiers/Cargo.toml b/framework-crates/objc2-uniform-type-identifiers/Cargo.toml index 907bd785c..937fa6825 100644 --- a/framework-crates/objc2-uniform-type-identifiers/Cargo.toml +++ b/framework-crates/objc2-uniform-type-identifiers/Cargo.toml @@ -21,9 +21,9 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] NSItemProvider_UTType = [ diff --git a/framework-crates/objc2-user-notifications/Cargo.toml b/framework-crates/objc2-user-notifications/Cargo.toml index 4db176134..b95044fa3 100644 --- a/framework-crates/objc2-user-notifications/Cargo.toml +++ b/framework-crates/objc2-user-notifications/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-core-location = { path = "../objc2-core-location", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -43,8 +43,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-core-location?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-core-location?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-core-location = ["dep:objc2-core-location"] diff --git a/framework-crates/objc2-virtualization/Cargo.toml b/framework-crates/objc2-virtualization/Cargo.toml index 18f2438e0..ad2ec8d48 100644 --- a/framework-crates/objc2-virtualization/Cargo.toml +++ b/framework-crates/objc2-virtualization/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,8 +39,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/framework-crates/objc2-vision/Cargo.toml b/framework-crates/objc2-vision/Cargo.toml index 51711d866..ebaa771c0 100644 --- a/framework-crates/objc2-vision/Cargo.toml +++ b/framework-crates/objc2-vision/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", optional = true } -objc2-core-ml = { path = "../objc2-core-ml", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-core-image = { path = "../objc2-core-image", version = "0.2.0", default-features = false, optional = true } +objc2-core-ml = { path = "../objc2-core-ml", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -42,8 +42,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "block2?/std", "objc2/std", "objc2-core-image?/std", "objc2-core-ml?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-core-image?/alloc", "objc2-core-ml?/alloc", "objc2-foundation/alloc"] block2 = ["dep:block2"] objc2-core-image = ["dep:objc2-core-image"] objc2-core-ml = ["dep:objc2-core-ml"] diff --git a/framework-crates/objc2-web-kit/Cargo.toml b/framework-crates/objc2-web-kit/Cargo.toml index e27cee175..cdfd1e5dc 100644 --- a/framework-crates/objc2-web-kit/Cargo.toml +++ b/framework-crates/objc2-web-kit/Cargo.toml @@ -21,11 +21,11 @@ license = "MIT" workspace = true [dependencies] +bitflags = { version = "2.5.0", default-features = false, optional = true } +block2 = { path = "../../crates/block2", version = "0.5.0", default-features = false, optional = true } objc2 = { path = "../../crates/objc2", version = "0.5.1", default-features = false } -bitflags = { version = "2.5.0", optional = true } -block2 = { path = "../../crates/block2", version = "0.5.0", optional = true } -objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", optional = true } -objc2-foundation = { path = "../objc2-foundation", version = "0.2.0" } +objc2-app-kit = { path = "../objc2-app-kit", version = "0.2.0", default-features = false, optional = true } +objc2-foundation = { path = "../objc2-foundation", version = "0.2.0", default-features = false } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -41,8 +41,8 @@ targets = [ default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. -std = ["alloc", "objc2/std"] -alloc = ["objc2/alloc"] +std = ["alloc", "bitflags?/std", "block2?/std", "objc2/std", "objc2-app-kit?/std", "objc2-foundation/std"] +alloc = ["block2?/alloc", "objc2/alloc", "objc2-app-kit?/alloc", "objc2-foundation/alloc"] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] diff --git a/generated b/generated index 30ac39db1..14579e1ac 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 30ac39db19ee2e0c78481589523a4aad39e224b6 +Subproject commit 14579e1ac4103e8bf6c386991ff621d33b206911