diff --git a/crates/block2/translation-config.toml b/crates/block2/translation-config.toml new file mode 100644 index 000000000..8e77cc03f --- /dev/null +++ b/crates/block2/translation-config.toml @@ -0,0 +1,13 @@ +framework = "block" +crate = "block2" +required-crates = [] +link = false +skipped = true + +macos = "10.6" +maccatalyst = "13.0" +ios = "3.2" +tvos = "9.0" +watchos = "2.0" +visionos = "1.0" +gnustep = true diff --git a/crates/header-translator/README.md b/crates/header-translator/README.md index a39d46db6..fca96dfe6 100644 --- a/crates/header-translator/README.md +++ b/crates/header-translator/README.md @@ -45,7 +45,7 @@ To add a new framework crate, create a new empty crate in [`framework-crates`](. ```toml framework = "XXX" crate = "objc2-xxx" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "XXX" maccatalyst = "XXX" ios = "XXX" diff --git a/crates/header-translator/configs/bitflags.toml b/crates/header-translator/configs/bitflags.toml new file mode 100644 index 000000000..b2b74c687 --- /dev/null +++ b/crates/header-translator/configs/bitflags.toml @@ -0,0 +1,14 @@ +framework = "__bitflags__" +crate = "bitflags" +required-crates = [] +link = false +skipped = true + +# Available everywhere +macos = "10.0" +maccatalyst = "13.0" +ios = "2.0" +tvos = "9.0" +watchos = "2.0" +visionos = "1.0" +gnustep = true diff --git a/crates/header-translator/system-config.toml b/crates/header-translator/configs/builtin.toml similarity index 68% rename from crates/header-translator/system-config.toml rename to crates/header-translator/configs/builtin.toml index 3f214c0bf..be2a73c6d 100644 --- a/crates/header-translator/system-config.toml +++ b/crates/header-translator/configs/builtin.toml @@ -1,7 +1,10 @@ -# Fake data -framework = "System" -crate = "objc2-system" -required-dependencies = [] +framework = "__builtin__" +crate = "__builtin__" +required-crates = [] +link = false +skipped = true + +# Available everywhere macos = "10.0" maccatalyst = "13.0" ios = "2.0" @@ -10,13 +13,8 @@ watchos = "2.0" visionos = "1.0" gnustep = true -# Both a protocol and a class, so we use Swift's naming scheme -protocol.NSObject.renamed = "NSObjectProtocol" - -# Return type `oneway void` -class.NSObject.methods.release.skipped = true - # TODO: Move these + # `ns_consumed`, `cf_consumed` and `os_consumed` fn.IOServiceGetMatchingService.skipped = true fn.IOServiceGetMatchingServices.skipped = true diff --git a/crates/header-translator/configs/core.toml b/crates/header-translator/configs/core.toml new file mode 100644 index 000000000..15a4a5a7d --- /dev/null +++ b/crates/header-translator/configs/core.toml @@ -0,0 +1,14 @@ +framework = "__core__" +crate = "core" +required-crates = [] +link = false +skipped = true + +# Available everywhere +macos = "10.0" +maccatalyst = "13.0" +ios = "2.0" +tvos = "9.0" +watchos = "2.0" +visionos = "1.0" +gnustep = true diff --git a/crates/header-translator/configs/libc.toml b/crates/header-translator/configs/libc.toml new file mode 100644 index 000000000..9442352ba --- /dev/null +++ b/crates/header-translator/configs/libc.toml @@ -0,0 +1,14 @@ +framework = "__libc__" +crate = "libc" +required-crates = [] +link = false +skipped = true + +# Available everywhere +macos = "10.0" +maccatalyst = "13.0" +ios = "2.0" +tvos = "9.0" +watchos = "2.0" +visionos = "1.0" +gnustep = true diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 08a5d5f5c..0380e0f11 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -14,41 +14,45 @@ use crate::{ItemIdentifier, Location}; #[derive(Debug, Clone, PartialEq, Eq)] pub struct Config { - pub libraries: BTreeMap, - pub system: LibraryConfig, -} - -fn uses_system_config(library_name: &str) -> bool { - matches!( - library_name, - "System" | "bitflags" | "block2" | "libc" | "objc2" - ) + libraries: BTreeMap, } impl Config { - pub fn library(&self, library_name: &str) -> &LibraryConfig { - if uses_system_config(library_name) { - &self.system - } else { - self.libraries.get(library_name).unwrap_or_else(|| { - error!("tried to get library config from {library_name:?}"); - &self.system - }) + pub fn new( + mut libraries: BTreeMap, + ) -> Result> { + let configs_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("configs"); + + let builtin_files = ["bitflags.toml", "builtin.toml", "core.toml", "libc.toml"]; + + for builtin_file in builtin_files { + let path = configs_dir.join(builtin_file); + let config: LibraryConfig = basic_toml::from_str(&fs::read_to_string(path)?)?; + libraries.insert(config.framework.clone(), config); } + + Ok(Self { libraries }) } - pub fn library_from_crate(&self, krate: &str) -> &LibraryConfig { - if uses_system_config(krate) { - &self.system - } else { + pub fn library(&self, library_name: &str) -> &LibraryConfig { + self.libraries.get(library_name).unwrap_or_else(|| { + error!("tried to get library config from {library_name:?}"); self.libraries - .values() - .find(|lib| lib.krate == krate) - .unwrap_or_else(|| { - error!("tried to get library config from krate {krate:?}"); - &self.system - }) - } + .get("__builtin__") + .expect("could not find builtin library") + }) + } + + pub fn library_from_crate(&self, krate: &str) -> &LibraryConfig { + self.libraries + .values() + .find(|lib| lib.krate == krate) + .unwrap_or_else(|| { + error!("tried to get library config from krate {krate:?}"); + self.libraries + .get("__builtin__") + .expect("could not find builtin library") + }) } pub fn replace_protocol_name(&self, id: ItemIdentifier) -> ItemIdentifier { @@ -61,6 +65,13 @@ impl Config { .unwrap_or(name) }) } + + pub fn to_parse(&self) -> impl Iterator + Clone { + self.libraries + .iter() + .filter(|(_, data)| !data.skipped) + .map(|(name, data)| (&**name, data)) + } } fn get_version<'de, D: Deserializer<'de>>(deserializer: D) -> Result, D::Error> { @@ -118,12 +129,19 @@ pub struct LibraryConfig { /// want a feature for something as fundamental as `NSString`. /// Additionally, it is used for things like `MetalKit` always wanting /// `Metal` enabled. - #[serde(rename = "required-dependencies")] - pub required_dependencies: HashSet, + #[serde(rename = "required-crates")] + pub required_crates: HashSet, #[serde(rename = "custom-lib-rs")] #[serde(default)] pub custom_lib_rs: bool, + #[serde(default = "link_default")] + pub link: bool, + /// Whether we will attempt to parse and emit the library + /// (used for built-in modules). + #[serde(default)] + pub skipped: bool, + #[serde(default)] #[serde(deserialize_with = "get_version")] pub macos: Option, @@ -145,9 +163,6 @@ pub struct LibraryConfig { #[serde(default)] pub gnustep: bool, - #[serde(default = "link_default")] - pub link: bool, - /// Data about an external class or protocol whose header isn't imported. /// /// I.e. a bare `@protocol X;` or `@class X;`. diff --git a/crates/header-translator/src/id.rs b/crates/header-translator/src/id.rs index 79ee971c9..d5ef2c101 100644 --- a/crates/header-translator/src/id.rs +++ b/crates/header-translator/src/id.rs @@ -41,121 +41,43 @@ impl ToOptionString for () { #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Location { // A Swift/Clang module path (dot-separated). + // + // Special modules: + // __bitflags__ + // __builtin__ + // __core__ + // __libc__ module_path: Box, } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub enum LocationLibrary<'location, 'config> { - System, - Bitflags, - Block2, - Libc, - 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<'config> LocationLibrary<'_, '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, - } - } - - // FIXME: This is currently wrong for nested umbrella frameworks - // (specifically MetalPerformanceShaders). - 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 { fn new(module_path: impl Into>) -> Self { let module_path = module_path.into(); let module_path = match &*module_path { - // blocks - "block" => "block2".into(), - - // Objective-C - name if name.starts_with("ObjectiveC") => "objc2".into(), + // Normalize Objective-C (remove submodules) + name if name.starts_with("ObjectiveC") => "ObjectiveC".into(), - // Redefined in the framework crate itself. - "Darwin.MacTypes" => "System".into(), + // These types are redefined in the framework crate itself. + "Darwin.MacTypes" => "__builtin__".into(), - // Built-ins - "DarwinFoundation.types.machine_types" => "System".into(), - "_Builtin_stdarg.va_list" => "System".into(), + // `core::ffi` types + "DarwinFoundation.types.machine_types" => "__core__.ffi".into(), + "_Builtin_stdarg.va_list" => { + error!("va_list is not yet supported"); + "__core__.ffi".into() + } - // Libc - name if name.starts_with("sys_types") => "libc".into(), - "DarwinFoundation.types.sys_types" => "libc".into(), - "DarwinFoundation.qos" => "libc".into(), - name if name.starts_with("Darwin.POSIX") => "libc".into(), - "_stdio" => "libc".into(), - "_time.timespec" => "libc".into(), + // `libc` + name if name.starts_with("sys_types") => "__libc__".into(), + "DarwinFoundation.types.sys_types" => "__libc__".into(), + "DarwinFoundation.qos" => "__libc__".into(), + name if name.starts_with("Darwin.POSIX") => "__libc__".into(), + "_stdio" => "__libc__".into(), + "_time.timespec" => "__libc__".into(), // Will be moved to the `mach2` crate in `libc` v1.0 - name if name.starts_with("Darwin.Mach") => "libc".into(), - "_mach_port_t" => "libc".into(), + name if name.starts_with("Darwin.Mach") => "__libc__".into(), + "_mach_port_t" => "__libc__".into(), _ => module_path, }; @@ -172,8 +94,10 @@ impl Location { let path = file.get_path(); if !path.to_string_lossy().contains("System/Library/Frameworks") { - // Likely a built-in macro from stddef.h, stdarg.h or assert.h. - return Self::new("System"); + // If it doesn't have a module, and doesn't come from a framework, + // then it is probably a built-in macro from stddef.h, stdarg.h or + // likewise. + return Self::new("__builtin__"); } // The item likely comes from a private sub-framework, so let's try @@ -233,43 +157,105 @@ impl Location { self.module_path.split('.').skip(1) } - pub fn library<'location, 'config>( - &'location self, + pub fn crate_dependency<'config>( + &self, config: &'config Config, emission_library: &str, - ) -> LocationLibrary<'location, 'config> { + ) -> Option<&'config str> { + match self.library_name() { + "__builtin__" | "__core__" => None, + library if library == emission_library => None, + library => Some(&config.library(library).krate), + } + } + + /// The place from where a given item exists. + pub fn import(&self, config: &Config, emission_library: &str) -> Option> { match self.library_name() { - "System" => LocationLibrary::System, - "bitflags" => LocationLibrary::Bitflags, - "block2" => LocationLibrary::Block2, - "libc" => LocationLibrary::Libc, - "objc2" => LocationLibrary::Objc2, + "__builtin__" => None, + // TODO: Use `core::xyz` here. + "__core__" => None, + // Rare enough that it's written directly instead of + // glob-imported, see `ItemIdentifier::path`. + "__bitflags__" | "__libc__" | "block" => None, + "ObjectiveC" => Some("objc2::__framework_prelude".into()), + // Not currently needed, but might be useful to emit + // `Some("crate")` here in the future. + library if library == emission_library => None, 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 - .get(emission_library) - .unwrap_or_else(|| panic!("{emission_library} not found in libraries")) - .required_dependencies - .contains(krate); - LocationLibrary::InExternalLibrary { - library, - file_name, - krate, - required, - } - } + let krate = &config.library(library).krate; + Some(krate.replace('-', "_").into()) + } + } + } + + // Feature names are based on the file name, not the whole path to the feature. + pub fn cargo_toml_feature(&self, config: &Config, emission_library: &str) -> Option { + match self.library_name() { + "__builtin__" | "__core__" => None, + "__bitflags__" => { + let required = config + .library(emission_library) + .required_crates + .contains("bitflags"); + + // We want the bitflags feature to be enabled automatically + // when a file with bitflags are imported. + if !required { + Some("bitflags".into()) + } else { + None + } + } + // Don't emit dependency for local features (we want files to be + // independently activated). + library if library == emission_library => None, + // Matches e.g. objc2-foundation/NSArray, but not objc2 or + // libc (since that is configured in the source itself). + library => { + let krate = &config.library(library).krate; + let required = config + .library(emission_library) + .required_crates + .contains(krate); + + self.file_name().map(|file_name| { + format!( + "{krate}{}/{}", + if required { "" } else { "?" }, + clean_name(file_name), + ) + }) + } + } + } + + pub fn cargo_toml_feature_on_top_level(&self, emission_library: &str) -> Option { + match self.library_name() { + "__builtin__" | "__core__" => None, + library if library == emission_library => None, + _ => self.file_name().map(clean_name), + } + } + + // FIXME: This is currently wrong for nested umbrella frameworks + // (specifically MetalPerformanceShaders). + fn cfg_feature<'a>(&self, config: &'a Config, emission_library: &str) -> Option> { + match self.library_name() { + "__builtin__" | "__core__" => None, + library if library == emission_library => { + self.file_name().map(clean_name).map(Cow::Owned) + } + library => { + let krate = &config.library(library).krate; + let required = config + .library(emission_library) + .required_crates + .contains(krate); + if !required { + Some(Cow::Borrowed(krate)) } else { - error!(location = ?self, "failed getting crate name"); - LocationLibrary::System + None } } } @@ -399,17 +385,31 @@ impl ItemIdentifier { pub fn bitflags() -> Self { Self { name: "bitflags".into(), - location: Location::new("bitflags"), + location: Location::new("__bitflags__"), } } - pub fn objc2(name: impl Into) -> Self { + pub fn objc(name: impl Into) -> Self { Self { name: name.into(), location: Location::new("ObjectiveC"), } } + pub fn core_ffi(name: &str) -> Self { + Self { + name: name.into(), + location: Location::new("ObjectiveC"), // Temporary + } + } + + pub fn core_ptr(name: &str) -> Self { + Self { + name: name.into(), + location: Location::new("ObjectiveC"), // Temporary + } + } + pub fn main_thread_marker() -> Self { Self { name: "MainThreadMarker".into(), @@ -421,7 +421,7 @@ impl ItemIdentifier { pub fn dummy() -> Self { Self { name: "DUMMY".into(), - location: Location::new("System"), + location: Location::new("__builtin__"), } } @@ -439,9 +439,9 @@ impl ItemIdentifier { impl fmt::Display for ItemIdentifierPath<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 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), + "__bitflags__" => write!(f, "bitflags::{}", self.0.name), + "__libc__" => write!(f, "libc::{}", self.0.name), + "block" => write!(f, "block2::{}", self.0.name), _ => write!(f, "{}", self.0.name), } } @@ -525,7 +525,7 @@ pub fn cfg_gate_ln<'a, R: AsRef + 'a, I: AsRef + 'a>( for location in required_features { let location: &Location = location.as_ref(); - if let Some(feature_name) = location.library(config, emission_library).feature() { + if let Some(feature_name) = location.cfg_feature(config, emission_library) { feature_names.insert(feature_name); } @@ -534,7 +534,7 @@ pub fn cfg_gate_ln<'a, R: AsRef + 'a, I: AsRef + 'a>( for location in implied_features { let location: &Location = location.as_ref(); - if let Some(feature_name) = location.library(config, emission_library).feature() { + if let Some(feature_name) = location.cfg_feature(config, emission_library) { feature_names.remove(&feature_name); } diff --git a/crates/header-translator/src/library.rs b/crates/header-translator/src/library.rs index 2f70be4a4..51e87037e 100644 --- a/crates/header-translator/src/library.rs +++ b/crates/header-translator/src/library.rs @@ -25,7 +25,7 @@ pub struct Library { pub data: LibraryConfig, } -pub(crate) type Dependencies<'c> = BTreeMap<&'c str, (bool, String, BTreeSet)>; +type Dependencies<'c> = BTreeMap<&'c str, (bool, String, BTreeSet)>; impl Library { pub fn new(name: &str, data: &LibraryConfig) -> Self { @@ -58,48 +58,49 @@ impl Library { } pub fn dependencies<'c>(&self, config: &'c Config) -> Dependencies<'c> { - let mut dependencies: BTreeMap<_, _> = self + let mut dependencies: BTreeMap<&'c str, _> = self .module .all_items() .into_iter() .flat_map(|item| { let location = item.location(); location - .library(config, &self.link_name) - .krate() - .map(|(krate, required)| { + .crate_dependency(config, &self.link_name) + .map(|krate| { ( krate, + (false, location.library_name().to_string(), BTreeSet::new()), + ) + }) + }) + .chain( + config + .library(&self.link_name) + .required_crates + .iter() + .map(|krate| { + ( + &**krate, ( - required, - location.library_name().to_string(), + true, + config.library_from_crate(krate).framework.clone(), BTreeSet::new(), ), ) - }) - }) + }), + ) .collect(); // Process top-level statements for stmt in &self.module.stmts { for required_item in stmt.required_items_inner() { let location = required_item.location(); - 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; - } + if let Some(feature) = location.cargo_toml_feature_on_top_level(&self.link_name) { + let krate = &config.library(location.library_name()).krate; + if let Some((_, _, krate_features)) = dependencies.get_mut(&**krate) { + krate_features.insert(feature.to_string()); } else { - let (krate, feature) = feature.split_once('/').unwrap(); - let krate = krate.strip_suffix('?').unwrap_or(krate); - if let Some((_, _, krate_features)) = dependencies.get_mut(krate) { - krate_features.insert(feature.to_string()); - } else { - error!(?location, ?feature, "tried to set krate dependency feature"); - } + error!(?location, ?feature, "tried to set krate dependency feature"); } } } @@ -359,11 +360,9 @@ see that for related crates.", self.data.krate, self.link_name)?; add_newline_at_end(&mut cargo_toml["features"]); // Own features - let mut generated_features = self.module.required_cargo_features_inner( - config, - &self.link_name, - &dependency_map[&*self.link_name], - ); + let mut generated_features = self + .module + .required_cargo_features_inner(config, &self.link_name); let _ = generated_features.insert( "all".to_string(), diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 4eceaac57..797ab2197 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -89,10 +89,9 @@ fn main() -> Result<(), BoxError> { fs::create_dir_all(&tempdir)?; let libraries: BTreeMap<_, _> = config - .libraries - .keys() - .map(|name| { - let library = parse_framework(&index, &config, name, &sdks, &tempdir); + .to_parse() + .map(|(name, data)| { + let library = parse_framework(&index, &config, data, name, &sdks, &tempdir); (name.to_string(), library) }) .collect(); @@ -140,7 +139,7 @@ fn main() -> Result<(), BoxError> { library.output(&crate_dir, &test_crate_dir, &config, &dependency_map)?; } - update_test_metadata(&test_crate_dir, config.libraries.values()); + update_test_metadata(&test_crate_dir, config.to_parse().map(|(_, data)| data)); let span = info_span!("formatting").entered(); run_cargo_fmt(libraries.values().map(|library| &library.data.krate)); @@ -172,16 +171,25 @@ fn load_config(workspace_dir: &Path) -> Result { let path = workspace_dir .join("crates") - .join("header-translator") - .join("system-config.toml"); - let system = LibraryConfig::from_file(&path).expect("read system config"); + .join("block2") + .join("translation-config.toml"); + let objc = basic_toml::from_str(&fs::read_to_string(path)?)?; + libraries.insert("block".to_string(), objc); - Ok(Config { libraries, system }) + let path = workspace_dir + .join("crates") + .join("objc2") + .join("translation-config.toml"); + let objc = basic_toml::from_str(&fs::read_to_string(path)?)?; + libraries.insert("ObjectiveC".to_string(), objc); + + Config::new(libraries) } fn parse_framework( index: &Index<'_>, config: &Config, + data: &LibraryConfig, name: &str, sdks: &[SdkPath], tempdir: &Path, @@ -189,8 +197,6 @@ fn parse_framework( let _span = info_span!("framework", name).entered(); let mut result = None; - let data = config.library(name); - // Find preferred SDK, to hackily support UIKit. For speed, we currently // only parse each module once in total (though in the future we'll have // to parse it multiple times, and compare the result). @@ -515,7 +521,7 @@ fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> { ) -> io::Result<()> { // Use a BTreeSet to sort the libraries let mut frameworks = BTreeSet::new(); - for library in config.libraries.values() { + for (_, library) in config.to_parse() { if check(library) { frameworks.insert(&*library.krate); } @@ -622,7 +628,7 @@ fn update_list(workspace_dir: &Path, config: &Config) -> io::Result<()> { writeln!(f, "| Framework | Crate | Documentation |")?; writeln!(f, "| --- | --- | --- |")?; - for (name, library) in &config.libraries { + for (name, library) in config.to_parse() { let package = &library.krate; writeln!( f, diff --git a/crates/header-translator/src/module.rs b/crates/header-translator/src/module.rs index 72e20e969..51c275d04 100644 --- a/crates/header-translator/src/module.rs +++ b/crates/header-translator/src/module.rs @@ -7,7 +7,6 @@ use std::{fmt, fs}; use crate::cfgs::PlatformCfg; use crate::display_helper::FormatterFn; use crate::id::{cfg_gate_ln, Location}; -use crate::library::Dependencies; use crate::stmt::Stmt; use crate::{Config, ItemIdentifier}; @@ -47,7 +46,6 @@ impl Module { &self, config: &Config, emission_library: &str, - dependencies: &Dependencies<'_>, ) -> BTreeMap> { let mut required_features: BTreeMap> = BTreeMap::new(); @@ -58,27 +56,14 @@ 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 - .library(config, emission_library) - .cargo_toml_feature() - { - if feature == "bitflags" { - if let Some((true, _, _)) = dependencies.get("bitflags") { - continue; - } - } - // Feature names are based on the file name, not the - // whole path to the feature. + if let Some(feature) = location.cargo_toml_feature(config, emission_library) { features.insert(feature); } } } required_features.insert(clean_name(file_name), features); - required_features.extend(module.required_cargo_features_inner( - config, - emission_library, - dependencies, - )); + required_features + .extend(module.required_cargo_features_inner(config, emission_library)); } required_features @@ -96,23 +81,24 @@ impl Module { .flat_map(|stmt| stmt.required_items_inner()) .filter_map(|item| { item.location() - .library(config, emission_library) - .import() + .import(config, emission_library) .map(|import_data| (item.library_name().to_string(), import_data)) }) .collect(); let emission_config = &config.library(emission_library); - for (library_name, (krate, required)) in imports { + for (library_name, import) in imports { + let krate = &config.library(&library_name).krate; + let required = emission_config.required_crates.contains(krate); if !required { - writeln!(f, "#[cfg(feature = {:?})]", krate)?; + writeln!(f, "#[cfg(feature = {krate:?})]")?; } let mut platform_cfg = PlatformCfg::from_config(emission_config); platform_cfg.dependency(config.library(&library_name)); if let Some(cfg) = platform_cfg.cfgs() { writeln!(f, "#[cfg({cfg})]")?; } - writeln!(f, "use {}::*;", krate.replace('-', "_"))?; + writeln!(f, "use {import}::*;")?; } writeln!(f)?; writeln!(f, "use crate::*;")?; diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 4f2976568..4d73f46f6 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -261,15 +261,15 @@ pub enum Primitive { impl Primitive { fn required_items(&self) -> Vec { match self { - Self::ObjcBool => vec![ItemIdentifier::objc2("Bool")], - Self::NSInteger => vec![ItemIdentifier::objc2("NSInteger")], - Self::NSUInteger => vec![ItemIdentifier::objc2("NSUInteger")], - Self::Imp => vec![ItemIdentifier::objc2("Imp")], + Self::ObjcBool => vec![ItemIdentifier::objc("Bool")], + Self::NSInteger => vec![ItemIdentifier::objc("NSInteger")], + Self::NSUInteger => vec![ItemIdentifier::objc("NSUInteger")], + Self::Imp => vec![ItemIdentifier::objc("Imp")], + Self::VaList => vec![ItemIdentifier::core_ffi("VaList")], _ => { let s = self.as_str(); if s.starts_with("c_") { - // Temporary, until we can import these by themselves - vec![ItemIdentifier::objc2(s)] + vec![ItemIdentifier::core_ffi(s)] } else { vec![] } @@ -1128,15 +1128,15 @@ impl Ty { } Self::GenericParam { .. } => Vec::new(), Self::AnyObject { protocols } => { - let mut items = vec![ItemIdentifier::objc2("AnyObject")]; + let mut items = vec![ItemIdentifier::objc("AnyObject")]; for protocol in protocols { items.extend(protocol.required_items()); } items } - Self::AnyProtocol => vec![ItemIdentifier::objc2("AnyProtocol")], + Self::AnyProtocol => vec![ItemIdentifier::objc("AnyProtocol")], Self::AnyClass { protocols } => { - let mut items = vec![ItemIdentifier::objc2("AnyClass")]; + let mut items = vec![ItemIdentifier::objc("AnyClass")]; for protocol in protocols { items.extend(protocol.required_items()); } @@ -1146,7 +1146,7 @@ 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![ItemIdentifier::objc2("Sel")], + Self::Sel { .. } => vec![ItemIdentifier::objc("Sel")], Self::Pointer { pointee, nullability, @@ -1158,9 +1158,8 @@ impl Ty { .. } => { let mut items = pointee.required_items(); - // Temporary if *nullability == Nullability::NonNull { - items.push(ItemIdentifier::objc2("NonNull")); + items.push(ItemIdentifier::core_ptr("NonNull")); } items } @@ -1172,9 +1171,8 @@ impl Ty { } => { let mut items = to.required_items(); items.push(id.clone()); - // Temporary if *nullability == Nullability::NonNull { - items.push(ItemIdentifier::objc2("NonNull")); + items.push(ItemIdentifier::core_ptr("NonNull")); } items } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 1498dd330..61eb02e20 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -287,7 +287,7 @@ pub(crate) fn items_required_by_decl( ) -> Vec { let id = ItemIdentifier::new(entity, context); - let mut items = vec![ItemIdentifier::objc2("__macros__")]; + let mut items = vec![ItemIdentifier::objc("__macros__")]; match entity.get_kind() { EntityKind::ObjCInterfaceDecl => { @@ -1527,7 +1527,7 @@ impl Stmt { } => cls_required_items.clone(), // Intentionally doesn't require anything, the impl itself is // cfg-gated - Self::ExternCategory { .. } => vec![ItemIdentifier::objc2("__macros__")], + Self::ExternCategory { .. } => vec![ItemIdentifier::objc("__macros__")], Self::ProtocolDecl { required_items, .. } => required_items.clone(), Self::ProtocolImpl { cls_required_items, @@ -1544,13 +1544,13 @@ impl Stmt { for (_, field_ty) in fields { items.extend(field_ty.required_items()); } - items.push(ItemIdentifier::objc2("Encoding")); + items.push(ItemIdentifier::objc("Encoding")); items } // Variants manage required items themselves Self::EnumDecl { ty, .. } => { let mut items = ty.required_items(); - items.push(ItemIdentifier::objc2("Encoding")); + items.push(ItemIdentifier::objc("Encoding")); items } Self::ConstDecl { ty, value, .. } => { @@ -1917,7 +1917,7 @@ impl Stmt { // The object inherits from `NSObject` or `NSProxy` no // matter what the generic type is, so this must be // safe. - ("objc2", "NSObjectProtocol") => ("?Sized", None), + ("ObjectiveC", "NSObjectProtocol") => ("?Sized", None), // Encoding and decoding requires that the inner types // are codable as well. ("Foundation", "NSCoding") => ("?Sized + NSCoding", None), diff --git a/crates/objc2/translation-config.toml b/crates/objc2/translation-config.toml new file mode 100644 index 000000000..d7604a2ac --- /dev/null +++ b/crates/objc2/translation-config.toml @@ -0,0 +1,19 @@ +framework = "ObjectiveC" +crate = "objc2" +required-crates = [] +link = false +skipped = true + +macos = "10.0" +maccatalyst = "13.0" +ios = "2.0" +tvos = "9.0" +watchos = "2.0" +visionos = "1.0" +gnustep = true + +# Both a protocol and a class, so we use Swift's naming scheme +protocol.NSObject.renamed = "NSObjectProtocol" + +# Return type `oneway void` +class.NSObject.methods.release.skipped = true diff --git a/framework-crates/objc2-accessibility/translation-config.toml b/framework-crates/objc2-accessibility/translation-config.toml index 045312d60..831774cc7 100644 --- a/framework-crates/objc2-accessibility/translation-config.toml +++ b/framework-crates/objc2-accessibility/translation-config.toml @@ -1,6 +1,6 @@ framework = "Accessibility" crate = "objc2-accessibility" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" diff --git a/framework-crates/objc2-accounts/translation-config.toml b/framework-crates/objc2-accounts/translation-config.toml index 229f889c8..f9b1b0ed0 100644 --- a/framework-crates/objc2-accounts/translation-config.toml +++ b/framework-crates/objc2-accounts/translation-config.toml @@ -1,6 +1,6 @@ framework = "Accounts" crate = "objc2-accounts" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.8" maccatalyst = "13.0" ios = "5.0" diff --git a/framework-crates/objc2-ad-services/translation-config.toml b/framework-crates/objc2-ad-services/translation-config.toml index 2571ea487..c53a98001 100644 --- a/framework-crates/objc2-ad-services/translation-config.toml +++ b/framework-crates/objc2-ad-services/translation-config.toml @@ -1,6 +1,6 @@ framework = "AdServices" crate = "objc2-ad-services" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.1" maccatalyst = "14.3" ios = "14.3" diff --git a/framework-crates/objc2-ad-support/translation-config.toml b/framework-crates/objc2-ad-support/translation-config.toml index 52a174c90..b62bfd755 100644 --- a/framework-crates/objc2-ad-support/translation-config.toml +++ b/framework-crates/objc2-ad-support/translation-config.toml @@ -1,6 +1,6 @@ framework = "AdSupport" crate = "objc2-ad-support" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.14" maccatalyst = "13.0" ios = "6.0" diff --git a/framework-crates/objc2-app-kit/translation-config.toml b/framework-crates/objc2-app-kit/translation-config.toml index 18da0d862..e2730d610 100644 --- a/framework-crates/objc2-app-kit/translation-config.toml +++ b/framework-crates/objc2-app-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "AppKit" crate = "objc2-app-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.0" maccatalyst = "13.0" diff --git a/framework-crates/objc2-app-tracking-transparency/translation-config.toml b/framework-crates/objc2-app-tracking-transparency/translation-config.toml index 81a873458..ec29b110a 100644 --- a/framework-crates/objc2-app-tracking-transparency/translation-config.toml +++ b/framework-crates/objc2-app-tracking-transparency/translation-config.toml @@ -1,6 +1,6 @@ framework = "AppTrackingTransparency" crate = "objc2-app-tracking-transparency" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" diff --git a/framework-crates/objc2-audio-toolbox/translation-config.toml b/framework-crates/objc2-audio-toolbox/translation-config.toml index a108e400c..8e341ee57 100644 --- a/framework-crates/objc2-audio-toolbox/translation-config.toml +++ b/framework-crates/objc2-audio-toolbox/translation-config.toml @@ -1,6 +1,6 @@ framework = "AudioToolbox" crate = "objc2-audio-toolbox" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.0" maccatalyst = "13.1" diff --git a/framework-crates/objc2-authentication-services/translation-config.toml b/framework-crates/objc2-authentication-services/translation-config.toml index 8129e310a..1f6d238e0 100644 --- a/framework-crates/objc2-authentication-services/translation-config.toml +++ b/framework-crates/objc2-authentication-services/translation-config.toml @@ -1,6 +1,6 @@ framework = "AuthenticationServices" crate = "objc2-authentication-services" -required-dependencies = ["objc2-app-kit", "objc2-foundation"] +required-crates = ["objc2", "objc2-foundation", "objc2-app-kit"] custom-lib-rs = true macos = "10.15" maccatalyst = "13.0" diff --git a/framework-crates/objc2-automatic-assessment-configuration/translation-config.toml b/framework-crates/objc2-automatic-assessment-configuration/translation-config.toml index 7d8fb468e..40e58db1b 100644 --- a/framework-crates/objc2-automatic-assessment-configuration/translation-config.toml +++ b/framework-crates/objc2-automatic-assessment-configuration/translation-config.toml @@ -1,6 +1,6 @@ framework = "AutomaticAssessmentConfiguration" crate = "objc2-automatic-assessment-configuration" -required-dependencies = ["objc2-foundation"] +required-crates = ["bitflags", "objc2", "objc2-foundation"] macos = "10.15.4" maccatalyst = "13.4" ios = "13.4" diff --git a/framework-crates/objc2-automator/translation-config.toml b/framework-crates/objc2-automator/translation-config.toml index dfbb359ee..85467592b 100644 --- a/framework-crates/objc2-automator/translation-config.toml +++ b/framework-crates/objc2-automator/translation-config.toml @@ -1,6 +1,6 @@ framework = "Automator" crate = "objc2-automator" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.4" maccatalyst = "14.0" diff --git a/framework-crates/objc2-av-foundation/translation-config.toml b/framework-crates/objc2-av-foundation/translation-config.toml index aa301e505..a3ef9d5ea 100644 --- a/framework-crates/objc2-av-foundation/translation-config.toml +++ b/framework-crates/objc2-av-foundation/translation-config.toml @@ -1,6 +1,6 @@ framework = "AVFoundation" crate = "objc2-av-foundation" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.7" maccatalyst = "13.1" diff --git a/framework-crates/objc2-av-kit/translation-config.toml b/framework-crates/objc2-av-kit/translation-config.toml index c1d659051..28a2f926e 100644 --- a/framework-crates/objc2-av-kit/translation-config.toml +++ b/framework-crates/objc2-av-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "AVKit" crate = "objc2-av-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.9" maccatalyst = "13.0" ios = "8.0" diff --git a/framework-crates/objc2-avf-audio/translation-config.toml b/framework-crates/objc2-avf-audio/translation-config.toml index 46697f2d5..aabbcfcdd 100644 --- a/framework-crates/objc2-avf-audio/translation-config.toml +++ b/framework-crates/objc2-avf-audio/translation-config.toml @@ -1,6 +1,6 @@ framework = "AVFAudio" crate = "objc2-avf-audio" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true # The documentation says something newer here, but since AVFAudio was # originally available as part of AVFoundation, the linker is able to figure diff --git a/framework-crates/objc2-background-assets/translation-config.toml b/framework-crates/objc2-background-assets/translation-config.toml index 0be578376..510c65da5 100644 --- a/framework-crates/objc2-background-assets/translation-config.toml +++ b/framework-crates/objc2-background-assets/translation-config.toml @@ -1,6 +1,6 @@ framework = "BackgroundAssets" crate = "objc2-background-assets" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "13.0" maccatalyst = "16.0" ios = "16.0" diff --git a/framework-crates/objc2-background-tasks/translation-config.toml b/framework-crates/objc2-background-tasks/translation-config.toml index 90912659c..b522447b8 100644 --- a/framework-crates/objc2-background-tasks/translation-config.toml +++ b/framework-crates/objc2-background-tasks/translation-config.toml @@ -1,6 +1,6 @@ framework = "BackgroundTasks" crate = "objc2-background-tasks" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] maccatalyst = "13.0" ios = "13.0" tvos = "13.0" diff --git a/framework-crates/objc2-business-chat/translation-config.toml b/framework-crates/objc2-business-chat/translation-config.toml index df4dd5c59..f962bb7dd 100644 --- a/framework-crates/objc2-business-chat/translation-config.toml +++ b/framework-crates/objc2-business-chat/translation-config.toml @@ -1,6 +1,6 @@ framework = "BusinessChat" crate = "objc2-business-chat" -required-dependencies = ["objc2-app-kit", "objc2-foundation"] +required-crates = ["objc2", "objc2-foundation", "objc2-app-kit"] macos = "10.14" maccatalyst = "13.0" # Unsure ios = "11.0" # Unsure diff --git a/framework-crates/objc2-call-kit/translation-config.toml b/framework-crates/objc2-call-kit/translation-config.toml index ee1bf0f42..f2e41e874 100644 --- a/framework-crates/objc2-call-kit/translation-config.toml +++ b/framework-crates/objc2-call-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "CallKit" crate = "objc2-call-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "13.0" maccatalyst = "13.0" diff --git a/framework-crates/objc2-class-kit/translation-config.toml b/framework-crates/objc2-class-kit/translation-config.toml index ddf3ad430..ce7105082 100644 --- a/framework-crates/objc2-class-kit/translation-config.toml +++ b/framework-crates/objc2-class-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "ClassKit" crate = "objc2-class-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "11.4" diff --git a/framework-crates/objc2-cloud-kit/translation-config.toml b/framework-crates/objc2-cloud-kit/translation-config.toml index 724b8ed3f..75bd877ae 100644 --- a/framework-crates/objc2-cloud-kit/translation-config.toml +++ b/framework-crates/objc2-cloud-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "CloudKit" crate = "objc2-cloud-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "8.0" diff --git a/framework-crates/objc2-contacts-ui/translation-config.toml b/framework-crates/objc2-contacts-ui/translation-config.toml index 4d62e73e4..5e02d3ae9 100644 --- a/framework-crates/objc2-contacts-ui/translation-config.toml +++ b/framework-crates/objc2-contacts-ui/translation-config.toml @@ -1,6 +1,6 @@ framework = "ContactsUI" crate = "objc2-contacts-ui" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.11" maccatalyst = "13.0" ios = "9.0" diff --git a/framework-crates/objc2-contacts/translation-config.toml b/framework-crates/objc2-contacts/translation-config.toml index c7fd19088..4e10fadf5 100644 --- a/framework-crates/objc2-contacts/translation-config.toml +++ b/framework-crates/objc2-contacts/translation-config.toml @@ -1,6 +1,6 @@ framework = "Contacts" crate = "objc2-contacts" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.11" maccatalyst = "13.0" ios = "9.0" diff --git a/framework-crates/objc2-core-audio-types/translation-config.toml b/framework-crates/objc2-core-audio-types/translation-config.toml index dab655147..9768df6d9 100644 --- a/framework-crates/objc2-core-audio-types/translation-config.toml +++ b/framework-crates/objc2-core-audio-types/translation-config.toml @@ -1,6 +1,7 @@ framework = "CoreAudioTypes" crate = "objc2-core-audio-types" -required-dependencies = [] +required-crates = ["objc2"] # Temporary +link = false # This framework only contains types custom-lib-rs = true macos = "10.15" maccatalyst = "13.0" @@ -8,7 +9,6 @@ ios = "13.0" tvos = "13.0" watchos = "6.0" visionos = "1.0" -link = false # This framework only contains types # Requires a cast enum.anonymous.constants.AVAudioSessionErrorInsufficientPriority.skipped = true diff --git a/framework-crates/objc2-core-bluetooth/translation-config.toml b/framework-crates/objc2-core-bluetooth/translation-config.toml index eae940369..5b5aaeb7b 100644 --- a/framework-crates/objc2-core-bluetooth/translation-config.toml +++ b/framework-crates/objc2-core-bluetooth/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreBluetooth" crate = "objc2-core-bluetooth" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "5.0" diff --git a/framework-crates/objc2-core-data/translation-config.toml b/framework-crates/objc2-core-data/translation-config.toml index 2d086bb9e..0a3bb7ed0 100644 --- a/framework-crates/objc2-core-data/translation-config.toml +++ b/framework-crates/objc2-core-data/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreData" crate = "objc2-core-data" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.4" maccatalyst = "13.0" ios = "3.0" diff --git a/framework-crates/objc2-core-foundation/translation-config.toml b/framework-crates/objc2-core-foundation/translation-config.toml index a78e0a140..9a3b04eba 100644 --- a/framework-crates/objc2-core-foundation/translation-config.toml +++ b/framework-crates/objc2-core-foundation/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreFoundation" crate = "objc2-core-foundation" -required-dependencies = [] +required-crates = ["objc2"] # Temporary custom-lib-rs = true macos = "10.0" maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-graphics/translation-config.toml b/framework-crates/objc2-core-graphics/translation-config.toml index e0c7de70f..c4d2eb40d 100644 --- a/framework-crates/objc2-core-graphics/translation-config.toml +++ b/framework-crates/objc2-core-graphics/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreGraphics" crate = "objc2-core-graphics" -required-dependencies = [] +required-crates = ["objc2"] # Temporary custom-lib-rs = true macos = "10.8" maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-image/translation-config.toml b/framework-crates/objc2-core-image/translation-config.toml index 4be083df2..237e8c688 100644 --- a/framework-crates/objc2-core-image/translation-config.toml +++ b/framework-crates/objc2-core-image/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreImage" crate = "objc2-core-image" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.11" maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-location/translation-config.toml b/framework-crates/objc2-core-location/translation-config.toml index 1179d3891..4f0f81e0f 100644 --- a/framework-crates/objc2-core-location/translation-config.toml +++ b/framework-crates/objc2-core-location/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreLocation" crate = "objc2-core-location" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] # macos = "10.6" macos = "10.11" # Temporarily raised since `CoreLocation` imports `Contacts` maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-media/translation-config.toml b/framework-crates/objc2-core-media/translation-config.toml index df02f4cb0..5a5d5a0af 100644 --- a/framework-crates/objc2-core-media/translation-config.toml +++ b/framework-crates/objc2-core-media/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreMedia" crate = "objc2-core-media" -required-dependencies = [] +required-crates = ["objc2"] # Temporary custom-lib-rs = true macos = "10.7" maccatalyst = "13.1" diff --git a/framework-crates/objc2-core-ml/translation-config.toml b/framework-crates/objc2-core-ml/translation-config.toml index 96d61f773..c2e32728b 100644 --- a/framework-crates/objc2-core-ml/translation-config.toml +++ b/framework-crates/objc2-core-ml/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreML" crate = "objc2-core-ml" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.13" maccatalyst = "10.13" diff --git a/framework-crates/objc2-core-motion/translation-config.toml b/framework-crates/objc2-core-motion/translation-config.toml index a4e20bbcf..d1f3c6ab1 100644 --- a/framework-crates/objc2-core-motion/translation-config.toml +++ b/framework-crates/objc2-core-motion/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreMotion" crate = "objc2-core-motion" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "4.0" diff --git a/framework-crates/objc2-core-text/translation-config.toml b/framework-crates/objc2-core-text/translation-config.toml index 70e8c3958..96195a419 100644 --- a/framework-crates/objc2-core-text/translation-config.toml +++ b/framework-crates/objc2-core-text/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreText" crate = "objc2-core-text" -required-dependencies = [] +required-crates = ["objc2"] # Temporary custom-lib-rs = true macos = "10.8" maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-video/translation-config.toml b/framework-crates/objc2-core-video/translation-config.toml index d41bd76b8..a7ff551f1 100644 --- a/framework-crates/objc2-core-video/translation-config.toml +++ b/framework-crates/objc2-core-video/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreVideo" crate = "objc2-core-video" -required-dependencies = [] +required-crates = ["objc2"] # Temporary custom-lib-rs = true macos = "10.4" maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-wlan/translation-config.toml b/framework-crates/objc2-core-wlan/translation-config.toml index b0761373c..b77c24cf3 100644 --- a/framework-crates/objc2-core-wlan/translation-config.toml +++ b/framework-crates/objc2-core-wlan/translation-config.toml @@ -1,6 +1,6 @@ framework = "CoreWLAN" crate = "objc2-core-wlan" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.6" maccatalyst = "13.0" diff --git a/framework-crates/objc2-data-detection/translation-config.toml b/framework-crates/objc2-data-detection/translation-config.toml index 3f1d9da32..75a178069 100644 --- a/framework-crates/objc2-data-detection/translation-config.toml +++ b/framework-crates/objc2-data-detection/translation-config.toml @@ -1,6 +1,6 @@ framework = "DataDetection" crate = "objc2-data-detection" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "12.0" maccatalyst = "15.0" ios = "15.0" diff --git a/framework-crates/objc2-device-check/translation-config.toml b/framework-crates/objc2-device-check/translation-config.toml index 07c04e5cb..22fb782af 100644 --- a/framework-crates/objc2-device-check/translation-config.toml +++ b/framework-crates/objc2-device-check/translation-config.toml @@ -1,6 +1,6 @@ framework = "DeviceCheck" crate = "objc2-device-check" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "11.0" diff --git a/framework-crates/objc2-event-kit-ui/translation-config.toml b/framework-crates/objc2-event-kit-ui/translation-config.toml index bb8762ec0..51ea6c120 100644 --- a/framework-crates/objc2-event-kit-ui/translation-config.toml +++ b/framework-crates/objc2-event-kit-ui/translation-config.toml @@ -1,6 +1,6 @@ framework = "EventKitUI" crate = "objc2-event-kit-ui" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] maccatalyst = "13.0" ios = "4.0" visionos = "1.0" diff --git a/framework-crates/objc2-event-kit/translation-config.toml b/framework-crates/objc2-event-kit/translation-config.toml index 023aa7966..0b8d131ed 100644 --- a/framework-crates/objc2-event-kit/translation-config.toml +++ b/framework-crates/objc2-event-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "EventKit" crate = "objc2-event-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.8" maccatalyst = "13.0" ios = "4.0" diff --git a/framework-crates/objc2-exception-handling/translation-config.toml b/framework-crates/objc2-exception-handling/translation-config.toml index 57dbac560..155a42f6c 100644 --- a/framework-crates/objc2-exception-handling/translation-config.toml +++ b/framework-crates/objc2-exception-handling/translation-config.toml @@ -1,5 +1,5 @@ framework = "ExceptionHandling" crate = "objc2-exception-handling" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.0" maccatalyst = "13.0" diff --git a/framework-crates/objc2-extension-kit/translation-config.toml b/framework-crates/objc2-extension-kit/translation-config.toml index fd619507a..a6e99367d 100644 --- a/framework-crates/objc2-extension-kit/translation-config.toml +++ b/framework-crates/objc2-extension-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "ExtensionKit" crate = "objc2-extension-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "13.0" maccatalyst = "13.0" ios = "16.1" diff --git a/framework-crates/objc2-external-accessory/translation-config.toml b/framework-crates/objc2-external-accessory/translation-config.toml index 3f5667845..e6dffd330 100644 --- a/framework-crates/objc2-external-accessory/translation-config.toml +++ b/framework-crates/objc2-external-accessory/translation-config.toml @@ -1,6 +1,6 @@ framework = "ExternalAccessory" crate = "objc2-external-accessory" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.13" maccatalyst = "16.0" ios = "3.0" diff --git a/framework-crates/objc2-file-provider-ui/translation-config.toml b/framework-crates/objc2-file-provider-ui/translation-config.toml index 441241702..bf8626039 100644 --- a/framework-crates/objc2-file-provider-ui/translation-config.toml +++ b/framework-crates/objc2-file-provider-ui/translation-config.toml @@ -1,6 +1,6 @@ framework = "FileProviderUI" crate = "objc2-file-provider-ui" -required-dependencies = ["objc2-file-provider", "objc2-foundation"] +required-crates = ["objc2", "objc2-foundation", "objc2-file-provider"] macos = "10.15" maccatalyst = "15.0" ios = "11.0" diff --git a/framework-crates/objc2-file-provider/translation-config.toml b/framework-crates/objc2-file-provider/translation-config.toml index e4afae5a9..8276807d5 100644 --- a/framework-crates/objc2-file-provider/translation-config.toml +++ b/framework-crates/objc2-file-provider/translation-config.toml @@ -1,6 +1,6 @@ framework = "FileProvider" crate = "objc2-file-provider" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.15" ios = "11.0" diff --git a/framework-crates/objc2-finder-sync/translation-config.toml b/framework-crates/objc2-finder-sync/translation-config.toml index 6454e2732..8a72412d3 100644 --- a/framework-crates/objc2-finder-sync/translation-config.toml +++ b/framework-crates/objc2-finder-sync/translation-config.toml @@ -1,6 +1,6 @@ framework = "FinderSync" crate = "objc2-finder-sync" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.10" # Both a protocol and a class, so we use Swift's naming scheme diff --git a/framework-crates/objc2-foundation/translation-config.toml b/framework-crates/objc2-foundation/translation-config.toml index 0e67e39bb..78a12c891 100644 --- a/framework-crates/objc2-foundation/translation-config.toml +++ b/framework-crates/objc2-foundation/translation-config.toml @@ -1,6 +1,6 @@ framework = "Foundation" crate = "objc2-foundation" -required-dependencies = [] +required-crates = ["objc2"] custom-lib-rs = true macos = "10.0" maccatalyst = "13.0" diff --git a/framework-crates/objc2-game-controller/translation-config.toml b/framework-crates/objc2-game-controller/translation-config.toml index 7494357d2..3d2d5fefb 100644 --- a/framework-crates/objc2-game-controller/translation-config.toml +++ b/framework-crates/objc2-game-controller/translation-config.toml @@ -1,6 +1,6 @@ framework = "GameController" crate = "objc2-game-controller" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.9" maccatalyst = "13.0" diff --git a/framework-crates/objc2-game-kit/translation-config.toml b/framework-crates/objc2-game-kit/translation-config.toml index 049a6ba8b..3b3a17b8c 100644 --- a/framework-crates/objc2-game-kit/translation-config.toml +++ b/framework-crates/objc2-game-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "GameKit" crate = "objc2-game-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.8" maccatalyst = "13.0" ios = "3.0" diff --git a/framework-crates/objc2-health-kit/translation-config.toml b/framework-crates/objc2-health-kit/translation-config.toml index 95a06dc3a..3a6563746 100644 --- a/framework-crates/objc2-health-kit/translation-config.toml +++ b/framework-crates/objc2-health-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "HealthKit" crate = "objc2-health-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "13.0" maccatalyst = "13.0" ios = "8.0" diff --git a/framework-crates/objc2-identity-lookup/translation-config.toml b/framework-crates/objc2-identity-lookup/translation-config.toml index 7389b41c5..658bf7baa 100644 --- a/framework-crates/objc2-identity-lookup/translation-config.toml +++ b/framework-crates/objc2-identity-lookup/translation-config.toml @@ -1,6 +1,6 @@ framework = "IdentityLookup" crate = "objc2-identity-lookup" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "11.0" diff --git a/framework-crates/objc2-input-method-kit/translation-config.toml b/framework-crates/objc2-input-method-kit/translation-config.toml index baebb3d01..02c1c9dac 100644 --- a/framework-crates/objc2-input-method-kit/translation-config.toml +++ b/framework-crates/objc2-input-method-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "InputMethodKit" crate = "objc2-input-method-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.5" diff --git a/framework-crates/objc2-io-surface/translation-config.toml b/framework-crates/objc2-io-surface/translation-config.toml index 97385e356..36eb35c83 100644 --- a/framework-crates/objc2-io-surface/translation-config.toml +++ b/framework-crates/objc2-io-surface/translation-config.toml @@ -1,6 +1,6 @@ framework = "IOSurface" crate = "objc2-io-surface" -required-dependencies = [] +required-crates = ["objc2"] # Temporary custom-lib-rs = true macos = "10.6" maccatalyst = "13.0" diff --git a/framework-crates/objc2-link-presentation/translation-config.toml b/framework-crates/objc2-link-presentation/translation-config.toml index 5dc6b7acb..d4a9331b8 100644 --- a/framework-crates/objc2-link-presentation/translation-config.toml +++ b/framework-crates/objc2-link-presentation/translation-config.toml @@ -1,6 +1,6 @@ framework = "LinkPresentation" crate = "objc2-link-presentation" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "13.0" diff --git a/framework-crates/objc2-local-authentication-embedded-ui/translation-config.toml b/framework-crates/objc2-local-authentication-embedded-ui/translation-config.toml index 911649535..7487e944d 100644 --- a/framework-crates/objc2-local-authentication-embedded-ui/translation-config.toml +++ b/framework-crates/objc2-local-authentication-embedded-ui/translation-config.toml @@ -1,6 +1,6 @@ framework = "LocalAuthenticationEmbeddedUI" crate = "objc2-local-authentication-embedded-ui" -required-dependencies = ["objc2-foundation", "objc2-local-authentication"] +required-crates = ["objc2", "objc2-foundation", "objc2-local-authentication"] macos = "12.0" maccatalyst = "16.0" ios = "16.0" diff --git a/framework-crates/objc2-local-authentication/translation-config.toml b/framework-crates/objc2-local-authentication/translation-config.toml index cca4f7e37..2fb6c9c48 100644 --- a/framework-crates/objc2-local-authentication/translation-config.toml +++ b/framework-crates/objc2-local-authentication/translation-config.toml @@ -1,6 +1,6 @@ framework = "LocalAuthentication" crate = "objc2-local-authentication" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "8.0" diff --git a/framework-crates/objc2-mail-kit/translation-config.toml b/framework-crates/objc2-mail-kit/translation-config.toml index 1ea62cf2c..44c1ab965 100644 --- a/framework-crates/objc2-mail-kit/translation-config.toml +++ b/framework-crates/objc2-mail-kit/translation-config.toml @@ -1,4 +1,4 @@ framework = "MailKit" crate = "objc2-mail-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "12.0" diff --git a/framework-crates/objc2-map-kit/translation-config.toml b/framework-crates/objc2-map-kit/translation-config.toml index e637f5c47..d3a18dd51 100644 --- a/framework-crates/objc2-map-kit/translation-config.toml +++ b/framework-crates/objc2-map-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "MapKit" crate = "objc2-map-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.9" maccatalyst = "13.0" diff --git a/framework-crates/objc2-media-player/translation-config.toml b/framework-crates/objc2-media-player/translation-config.toml index c8e1e7883..eb5771f18 100644 --- a/framework-crates/objc2-media-player/translation-config.toml +++ b/framework-crates/objc2-media-player/translation-config.toml @@ -1,6 +1,6 @@ framework = "MediaPlayer" crate = "objc2-media-player" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.12.1" maccatalyst = "13.0" ios = "2.0" diff --git a/framework-crates/objc2-metal-fx/translation-config.toml b/framework-crates/objc2-metal-fx/translation-config.toml index e0a18fe97..3c6dfa4a1 100644 --- a/framework-crates/objc2-metal-fx/translation-config.toml +++ b/framework-crates/objc2-metal-fx/translation-config.toml @@ -1,6 +1,6 @@ framework = "MetalFX" crate = "objc2-metal-fx" -required-dependencies = ["objc2-foundation", "objc2-metal"] +required-crates = ["objc2", "objc2-foundation", "objc2-metal"] macos = "13.0" maccatalyst = "16.0" ios = "16.0" diff --git a/framework-crates/objc2-metal-kit/translation-config.toml b/framework-crates/objc2-metal-kit/translation-config.toml index 028ce826a..e969e0218 100644 --- a/framework-crates/objc2-metal-kit/translation-config.toml +++ b/framework-crates/objc2-metal-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "MetalKit" crate = "objc2-metal-kit" -required-dependencies = ["objc2-foundation", "objc2-metal"] +required-crates = ["objc2", "objc2-foundation", "objc2-metal"] macos = "10.11" maccatalyst = "13.0" ios = "9.0" diff --git a/framework-crates/objc2-metal-performance-shaders-graph/translation-config.toml b/framework-crates/objc2-metal-performance-shaders-graph/translation-config.toml index fa05aec6c..69e5e0b9b 100644 --- a/framework-crates/objc2-metal-performance-shaders-graph/translation-config.toml +++ b/framework-crates/objc2-metal-performance-shaders-graph/translation-config.toml @@ -1,6 +1,6 @@ framework = "MetalPerformanceShadersGraph" crate = "objc2-metal-performance-shaders-graph" -required-dependencies = ["objc2-foundation", "objc2-metal"] +required-crates = ["objc2", "objc2-foundation", "objc2-metal"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" diff --git a/framework-crates/objc2-metal-performance-shaders/translation-config.toml b/framework-crates/objc2-metal-performance-shaders/translation-config.toml index 4e0de53ac..7b6ec0c62 100644 --- a/framework-crates/objc2-metal-performance-shaders/translation-config.toml +++ b/framework-crates/objc2-metal-performance-shaders/translation-config.toml @@ -1,6 +1,6 @@ framework = "MetalPerformanceShaders" crate = "objc2-metal-performance-shaders" -required-dependencies = ["objc2-foundation", "objc2-metal"] +required-crates = ["bitflags", "objc2", "objc2-foundation", "objc2-metal"] custom-lib-rs = true macos = "10.13" maccatalyst = "13.0" diff --git a/framework-crates/objc2-metal/translation-config.toml b/framework-crates/objc2-metal/translation-config.toml index d21d14887..d12ecebda 100644 --- a/framework-crates/objc2-metal/translation-config.toml +++ b/framework-crates/objc2-metal/translation-config.toml @@ -1,6 +1,6 @@ framework = "Metal" crate = "objc2-metal" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.11" maccatalyst = "13.0" diff --git a/framework-crates/objc2-metric-kit/translation-config.toml b/framework-crates/objc2-metric-kit/translation-config.toml index 29253622c..fe65cdffa 100644 --- a/framework-crates/objc2-metric-kit/translation-config.toml +++ b/framework-crates/objc2-metric-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "MetricKit" crate = "objc2-metric-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "12.0" maccatalyst = "13.0" diff --git a/framework-crates/objc2-ml-compute/translation-config.toml b/framework-crates/objc2-ml-compute/translation-config.toml index 26a292b01..db5f08fcb 100644 --- a/framework-crates/objc2-ml-compute/translation-config.toml +++ b/framework-crates/objc2-ml-compute/translation-config.toml @@ -1,6 +1,6 @@ framework = "MLCompute" crate = "objc2-ml-compute" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" diff --git a/framework-crates/objc2-multipeer-connectivity/translation-config.toml b/framework-crates/objc2-multipeer-connectivity/translation-config.toml index 8f61a2218..50d12dcf2 100644 --- a/framework-crates/objc2-multipeer-connectivity/translation-config.toml +++ b/framework-crates/objc2-multipeer-connectivity/translation-config.toml @@ -1,6 +1,6 @@ framework = "MultipeerConnectivity" crate = "objc2-multipeer-connectivity" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "7.0" diff --git a/framework-crates/objc2-natural-language/translation-config.toml b/framework-crates/objc2-natural-language/translation-config.toml index 6ad8c73a0..e4a9e5259 100644 --- a/framework-crates/objc2-natural-language/translation-config.toml +++ b/framework-crates/objc2-natural-language/translation-config.toml @@ -1,6 +1,6 @@ framework = "NaturalLanguage" crate = "objc2-natural-language" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.14" maccatalyst = "13.0" ios = "12.0" diff --git a/framework-crates/objc2-nearby-interaction/translation-config.toml b/framework-crates/objc2-nearby-interaction/translation-config.toml index 8e31a58a4..c31164edb 100644 --- a/framework-crates/objc2-nearby-interaction/translation-config.toml +++ b/framework-crates/objc2-nearby-interaction/translation-config.toml @@ -1,6 +1,6 @@ framework = "NearbyInteraction" crate = "objc2-nearby-interaction" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" diff --git a/framework-crates/objc2-network-extension/translation-config.toml b/framework-crates/objc2-network-extension/translation-config.toml index b16a97ff0..c4dc93db4 100644 --- a/framework-crates/objc2-network-extension/translation-config.toml +++ b/framework-crates/objc2-network-extension/translation-config.toml @@ -1,6 +1,6 @@ framework = "NetworkExtension" crate = "objc2-network-extension" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.10" maccatalyst = "13.0" ios = "8.0" diff --git a/framework-crates/objc2-open-directory/translation-config.toml b/framework-crates/objc2-open-directory/translation-config.toml index 4bc379c8d..9557f6d69 100644 --- a/framework-crates/objc2-open-directory/translation-config.toml +++ b/framework-crates/objc2-open-directory/translation-config.toml @@ -1,6 +1,6 @@ framework = "OpenDirectory" crate = "objc2-open-directory" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.6" maccatalyst = "13.0" diff --git a/framework-crates/objc2-osa-kit/translation-config.toml b/framework-crates/objc2-osa-kit/translation-config.toml index 625954ca7..b8f0f79f1 100644 --- a/framework-crates/objc2-osa-kit/translation-config.toml +++ b/framework-crates/objc2-osa-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "OSAKit" crate = "objc2-osa-kit" -required-dependencies = ["objc2-app-kit", "objc2-foundation"] +required-crates = ["objc2", "objc2-foundation", "objc2-app-kit"] custom-lib-rs = true macos = "10.4" diff --git a/framework-crates/objc2-photos-ui/translation-config.toml b/framework-crates/objc2-photos-ui/translation-config.toml index 9644a43c3..efd4caa10 100644 --- a/framework-crates/objc2-photos-ui/translation-config.toml +++ b/framework-crates/objc2-photos-ui/translation-config.toml @@ -1,6 +1,6 @@ framework = "PhotosUI" crate = "objc2-photos-ui" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.11" maccatalyst = "13.0" ios = "8.0" diff --git a/framework-crates/objc2-photos/translation-config.toml b/framework-crates/objc2-photos/translation-config.toml index 2d7b1485a..8817a9534 100644 --- a/framework-crates/objc2-photos/translation-config.toml +++ b/framework-crates/objc2-photos/translation-config.toml @@ -1,6 +1,6 @@ framework = "Photos" crate = "objc2-photos" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.11" maccatalyst = "13.0" diff --git a/framework-crates/objc2-quartz-core/translation-config.toml b/framework-crates/objc2-quartz-core/translation-config.toml index ec873a5fe..d8486984d 100644 --- a/framework-crates/objc2-quartz-core/translation-config.toml +++ b/framework-crates/objc2-quartz-core/translation-config.toml @@ -1,6 +1,6 @@ framework = "QuartzCore" crate = "objc2-quartz-core" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.3" maccatalyst = "13.0" diff --git a/framework-crates/objc2-screen-capture-kit/translation-config.toml b/framework-crates/objc2-screen-capture-kit/translation-config.toml index 4ebd75340..2c561cf3d 100644 --- a/framework-crates/objc2-screen-capture-kit/translation-config.toml +++ b/framework-crates/objc2-screen-capture-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "ScreenCaptureKit" crate = "objc2-screen-capture-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "12.3" diff --git a/framework-crates/objc2-screen-saver/translation-config.toml b/framework-crates/objc2-screen-saver/translation-config.toml index e2bfae1c4..5414f039f 100644 --- a/framework-crates/objc2-screen-saver/translation-config.toml +++ b/framework-crates/objc2-screen-saver/translation-config.toml @@ -1,4 +1,4 @@ framework = "ScreenSaver" crate = "objc2-screen-saver" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.0" diff --git a/framework-crates/objc2-sensitive-content-analysis/translation-config.toml b/framework-crates/objc2-sensitive-content-analysis/translation-config.toml index d4a5f2638..fe1612625 100644 --- a/framework-crates/objc2-sensitive-content-analysis/translation-config.toml +++ b/framework-crates/objc2-sensitive-content-analysis/translation-config.toml @@ -1,6 +1,6 @@ framework = "SensitiveContentAnalysis" crate = "objc2-sensitive-content-analysis" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "14.0" maccatalyst = "17.0" ios = "17.0" diff --git a/framework-crates/objc2-service-management/translation-config.toml b/framework-crates/objc2-service-management/translation-config.toml index 3738b3c8f..2e3810371 100644 --- a/framework-crates/objc2-service-management/translation-config.toml +++ b/framework-crates/objc2-service-management/translation-config.toml @@ -1,6 +1,6 @@ framework = "ServiceManagement" crate = "objc2-service-management" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.6" maccatalyst = "13.0" diff --git a/framework-crates/objc2-social/translation-config.toml b/framework-crates/objc2-social/translation-config.toml index c44728944..d0ec21cfd 100644 --- a/framework-crates/objc2-social/translation-config.toml +++ b/framework-crates/objc2-social/translation-config.toml @@ -1,6 +1,6 @@ framework = "Social" crate = "objc2-social" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.8" maccatalyst = "13.0" ios = "6.0" diff --git a/framework-crates/objc2-sound-analysis/translation-config.toml b/framework-crates/objc2-sound-analysis/translation-config.toml index 5aa582678..264af83d3 100644 --- a/framework-crates/objc2-sound-analysis/translation-config.toml +++ b/framework-crates/objc2-sound-analysis/translation-config.toml @@ -1,6 +1,6 @@ framework = "SoundAnalysis" crate = "objc2-sound-analysis" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "13.0" diff --git a/framework-crates/objc2-speech/translation-config.toml b/framework-crates/objc2-speech/translation-config.toml index 98d0a3774..381313697 100644 --- a/framework-crates/objc2-speech/translation-config.toml +++ b/framework-crates/objc2-speech/translation-config.toml @@ -1,6 +1,6 @@ framework = "Speech" crate = "objc2-speech" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" maccatalyst = "13.0" ios = "10.0" diff --git a/framework-crates/objc2-store-kit/translation-config.toml b/framework-crates/objc2-store-kit/translation-config.toml index 9040cd741..1a0627466 100644 --- a/framework-crates/objc2-store-kit/translation-config.toml +++ b/framework-crates/objc2-store-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "StoreKit" crate = "objc2-store-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.7" maccatalyst = "13.0" ios = "3.0" diff --git a/framework-crates/objc2-symbols/translation-config.toml b/framework-crates/objc2-symbols/translation-config.toml index 8cbea31da..ca602065b 100644 --- a/framework-crates/objc2-symbols/translation-config.toml +++ b/framework-crates/objc2-symbols/translation-config.toml @@ -1,6 +1,6 @@ framework = "Symbols" crate = "objc2-symbols" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "14.0" maccatalyst = "17.0" ios = "17.0" diff --git a/framework-crates/objc2-system-extensions/translation-config.toml b/framework-crates/objc2-system-extensions/translation-config.toml index b4817db45..5b5df4261 100644 --- a/framework-crates/objc2-system-extensions/translation-config.toml +++ b/framework-crates/objc2-system-extensions/translation-config.toml @@ -1,6 +1,6 @@ framework = "SystemExtensions" crate = "objc2-system-extensions" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.15" # Needs `dispatch_queue_t` from libdispatch diff --git a/framework-crates/objc2-ui-kit/translation-config.toml b/framework-crates/objc2-ui-kit/translation-config.toml index f9540d6f5..bc4df99fa 100644 --- a/framework-crates/objc2-ui-kit/translation-config.toml +++ b/framework-crates/objc2-ui-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "UIKit" crate = "objc2-ui-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true maccatalyst = "13.0" ios = "2.0" diff --git a/framework-crates/objc2-uniform-type-identifiers/translation-config.toml b/framework-crates/objc2-uniform-type-identifiers/translation-config.toml index e4e85397a..d4fd19777 100644 --- a/framework-crates/objc2-uniform-type-identifiers/translation-config.toml +++ b/framework-crates/objc2-uniform-type-identifiers/translation-config.toml @@ -1,6 +1,6 @@ framework = "UniformTypeIdentifiers" crate = "objc2-uniform-type-identifiers" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.0" maccatalyst = "14.0" ios = "14.0" diff --git a/framework-crates/objc2-user-notifications/translation-config.toml b/framework-crates/objc2-user-notifications/translation-config.toml index d884c7a92..768d8fce4 100644 --- a/framework-crates/objc2-user-notifications/translation-config.toml +++ b/framework-crates/objc2-user-notifications/translation-config.toml @@ -1,6 +1,6 @@ framework = "UserNotifications" crate = "objc2-user-notifications" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "10.14" maccatalyst = "13.0" ios = "10.0" diff --git a/framework-crates/objc2-virtualization/translation-config.toml b/framework-crates/objc2-virtualization/translation-config.toml index 5a6bade59..fbd2243c4 100644 --- a/framework-crates/objc2-virtualization/translation-config.toml +++ b/framework-crates/objc2-virtualization/translation-config.toml @@ -1,6 +1,6 @@ framework = "Virtualization" crate = "objc2-virtualization" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] macos = "11.0" # Needs `ether_addr_t` diff --git a/framework-crates/objc2-vision/translation-config.toml b/framework-crates/objc2-vision/translation-config.toml index a867433ea..da7f11e0b 100644 --- a/framework-crates/objc2-vision/translation-config.toml +++ b/framework-crates/objc2-vision/translation-config.toml @@ -1,6 +1,6 @@ framework = "Vision" crate = "objc2-vision" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.13" maccatalyst = "13.0" diff --git a/framework-crates/objc2-web-kit/translation-config.toml b/framework-crates/objc2-web-kit/translation-config.toml index 7638b4a93..ca262620e 100644 --- a/framework-crates/objc2-web-kit/translation-config.toml +++ b/framework-crates/objc2-web-kit/translation-config.toml @@ -1,6 +1,6 @@ framework = "WebKit" crate = "objc2-web-kit" -required-dependencies = ["objc2-foundation"] +required-crates = ["objc2", "objc2-foundation"] custom-lib-rs = true macos = "10.2" maccatalyst = "13.0"