Cargo Features

[dependencies]
objc2-foundation = { version = "0.2.0", default-features = false, features = ["std", "alloc", "unstable-docsrs", "all", "apple", "gnustep-1-7", "gnustep-1-8", "gnustep-1-9", "gnustep-2-0", "gnustep-2-1", "unstable-static-nsstring", "dispatch", "block2", "NSAffineTransform", "NSAppleEventDescriptor", "NSArchiver", "NSArray", "NSBackgroundActivityScheduler", "NSCalendar", "NSCoder", "NSData", "NSDateInterval", "NSDecimalNumber", "NSDictionary", "NSDistributedNotificationCenter", "NSEnergyFormatter", "NSEnumerator", "NSError", "NSExtensionItem", "NSFileHandle", "NSFileWrapper", "NSGarbageCollector", "NSGeometry", "NSHashTable", "NSIndexSet", "NSJSONSerialization", "NSKeyedArchiver", "NSLocale", "NSLock", "NSMapTable", "NSMetadata", "NSNetServices", "NSNotification", "NSNumberFormatter", "NSObjCRuntime", "NSObject", "NSOrderedCollectionChange", "NSOrthography", "NSPersonNameComponents", "NSPointerArray", "NSPointerFunctions", "NSPredicate", "NSProxy", "NSRunLoop", "NSScriptCoercionHandler", "NSScriptExecutionContext", "NSScriptObjectSpecifiers", "NSScriptSuiteRegistry", "NSScriptWhoseTests", "NSSet", "NSStream", "NSString", "NSTextCheckingResult", "NSThread", "NSURLCache", "NSURLCredentialStorage", "NSURLProtectionSpace", "NSUUID", "NSUserActivity", "NSValue", "NSXMLDocument", "NSXMLParser", "NSXPCConnection", "NSZone"] }
default = apple, std

These default features are set whenever objc2-foundation is added without default-features = false somewhere in the dependency tree.

std default = alloc

Currently not possible to turn off, put here for forwards compatibility.

Enables std of optional block2 and objc2

alloc std

Enables alloc of optional block2 and objc2

unstable-docsrs

For better documentation on docs.rs

all = FoundationErrors, FoundationLegacySwiftCompatibility, NSAffineTransform, NSAppleEventDescriptor, NSAppleEventManager, NSAppleScript, NSArchiver, NSArray, NSAttributedString, NSAutoreleasePool, NSBackgroundActivityScheduler, NSBundle, NSByteCountFormatter, NSByteOrder, NSCache, NSCalendar, NSCalendarDate, NSCharacterSet, NSClassDescription, NSCoder, NSComparisonPredicate, NSCompoundPredicate, NSConnection, NSData, NSDate, NSDateComponentsFormatter, NSDateFormatter, NSDateInterval, NSDateIntervalFormatter, NSDecimal, NSDecimalNumber, NSDictionary, NSDistantObject, NSDistributedLock, NSDistributedNotificationCenter, NSEnergyFormatter, NSEnumerator, NSError, NSException, NSExpression, NSExtensionContext, NSExtensionItem, NSExtensionRequestHandling, NSFileCoordinator, NSFileHandle, NSFileManager, NSFilePresenter, NSFileVersion, NSFileWrapper, NSFormatter, NSGarbageCollector, NSGeometry, NSHFSFileTypes, NSHTTPCookie, NSHTTPCookieStorage, NSHashTable, NSHost, NSISO8601DateFormatter, NSIndexPath, NSIndexSet, NSInflectionRule, NSInvocation, NSItemProvider, NSJSONSerialization, NSKeyValueCoding, NSKeyValueObserving, NSKeyedArchiver, NSLengthFormatter, NSLinguisticTagger, NSListFormatter, NSLocale, NSLock, NSMapTable, NSMassFormatter, NSMeasurement, NSMeasurementFormatter, NSMetadata, NSMetadataAttributes, NSMethodSignature, NSMorphology, NSNetServices, NSNotification, NSNotificationQueue, NSNull, NSNumberFormatter, NSObjCRuntime, NSObject, NSObjectScripting, NSOperation, NSOrderedCollectionChange, NSOrderedCollectionDifference, NSOrderedSet, NSOrthography, NSPathUtilities, NSPersonNameComponents, NSPersonNameComponentsFormatter, NSPointerArray, NSPointerFunctions, NSPort, NSPortCoder, NSPortMessage, NSPortNameServer, NSPredicate, NSProcessInfo, NSProgress, NSPropertyList, NSProtocolChecker, NSProxy, NSRange, NSRegularExpression, NSRelativeDateTimeFormatter, NSRunLoop, NSScanner, NSScriptClassDescription, NSScriptCoercionHandler, NSScriptCommand, NSScriptCommandDescription, NSScriptExecutionContext, NSScriptKeyValueCoding, NSScriptObjectSpecifiers, NSScriptStandardSuiteCommands, NSScriptSuiteRegistry, NSScriptWhoseTests, NSSet, NSSortDescriptor, NSSpellServer, NSStream, NSString, NSTask, NSTermOfAddress, NSTextCheckingResult, NSThread, NSTimeZone, NSTimer, NSURL, NSURLAuthenticationChallenge, NSURLCache, NSURLConnection, NSURLCredential, NSURLCredentialStorage, NSURLDownload, NSURLError, NSURLHandle, NSURLProtectionSpace, NSURLProtocol, NSURLRequest, NSURLResponse, NSURLSession, NSUUID, NSUbiquitousKeyValueStore, NSUndoManager, NSUnit, NSUserActivity, NSUserDefaults, NSUserNotification, NSUserScriptTask, NSValue, NSValueTransformer, NSXMLDTD, NSXMLDTDNode, NSXMLDocument, NSXMLElement, NSXMLNode, NSXMLNodeOptions, NSXMLParser, NSXPCConnection, NSZone, block2
apple default

Enables apple of optional block2 and objc2

block2:

Link to Apple's libclosure (exists in libSystem).

gnustep-1-7 gnustep-1-8?

Enables gnustep-1-7 of optional block2 and objc2

block2:

Link to GNUStep's libobjc2 (which contains the block implementation).

gnustep-1-8 gnustep-1-9? = gnustep-1-7

Enables gnustep-1-8 of optional block2 and objc2

gnustep-1-9 gnustep-2-0? = gnustep-1-8

Enables gnustep-1-9 of optional block2 and objc2

gnustep-2-0 gnustep-2-1? = gnustep-1-9

Enables gnustep-2-0 of optional block2 and objc2

gnustep-2-1 = gnustep-2-0

Enables gnustep-2-1 of optional block2 and objc2

unstable-static-nsstring
dispatch

Enables dispatch

Affects thread::run_on_main, thread::MainThreadBound

block2 all?

Enables block2

Affects NSBackgroundActivityScheduler::NSBackgroundActivityCompletionHandler, NSObjCRuntime::NSComparator, NSProgress::NSProgressUnpublishingHandler, NSProgress::NSProgressPublishingHandler, NSUserScriptTask::NSUserScriptTaskCompletionHandler, NSUserScriptTask::NSUserUnixTaskCompletionHandler, NSUserScriptTask::NSUserAutomatorTaskCompletionHandler, NSItemProvider::NSItemProviderCompletionHandler, NSUserScriptTask::NSUserAppleScriptTaskCompletionHandler, NSItemProvider::NSItemProviderLoadHandler

FoundationErrors FoundationLegacySwiftCompatibility NSAffineTransform all?
NSAppleEventDescriptor all?

Affects NSUserScriptTask::NSUserAppleScriptTaskCompletionHandler

NSAppleEventManager NSAppleScript NSArchiver all?
NSArray all?

Affects NSHashTable::NSAllHashTableObjects, NSMapTable::NSAllMapTableKeys, NSMapTable::NSAllMapTableValues, objc2-foundation::array, NSPathUtilities::NSSearchPathForDirectoriesInDomains

NSAttributedString NSAutoreleasePool NSBackgroundActivityScheduler all?
NSBundle NSByteCountFormatter NSByteOrder NSCache NSCalendar all?
NSCalendarDate NSCharacterSet NSClassDescription NSCoder all?
NSComparisonPredicate NSCompoundPredicate NSConnection NSData all?
NSDate NSDateComponentsFormatter NSDateFormatter NSDateInterval all?
NSDateIntervalFormatter NSDecimal NSDecimalNumber all?
NSDictionary all?

Affects objc2-foundation::dictionary, NSItemProvider::NSItemProviderLoadHandler

NSDistantObject NSDistributedLock NSDistributedNotificationCenter all?
NSEnergyFormatter all?
NSEnumerator all?

Affects array::Iter, array::IterMut, array::IterRetained, array::IntoIter, objc2-foundation::enumerator, set::Iter, set::IterRetained, set::IntoIter

NSError all?

Affects NSNetServices::NSNetServicesErrorDomain, NSStream::NSStreamSocketSSLErrorDomain, NSStream::NSStreamSOCKSErrorDomain, NSURLError::NSURLErrorDomain, NSURLError::NSURLErrorNetworkUnavailableReasonKey, NSUserScriptTask::NSUserScriptTaskCompletionHandler, NSUserScriptTask::NSUserUnixTaskCompletionHandler, NSUserScriptTask::NSUserAutomatorTaskCompletionHandler, NSXMLParser::NSXMLParserErrorDomain, NSItemProvider::NSItemProviderCompletionHandler, NSUserScriptTask::NSUserAppleScriptTaskCompletionHandler, NSItemProvider::NSItemProviderLoadHandler

NSException NSExpression NSExtensionContext NSExtensionItem all?
NSExtensionRequestHandling NSFileCoordinator NSFileHandle all?
NSFileManager NSFilePresenter NSFileVersion NSFileWrapper all?
NSFormatter NSGarbageCollector all?
NSGeometry all?

Affects NSAffineTransform::NSAffineTransformStruct

NSHFSFileTypes NSHTTPCookie NSHTTPCookieStorage NSHashTable all?
NSHost NSISO8601DateFormatter NSIndexPath NSIndexSet all?
NSInflectionRule NSInvocation NSItemProvider NSJSONSerialization all?
NSKeyValueCoding NSKeyValueObserving NSKeyedArchiver all?
NSLengthFormatter NSLinguisticTagger NSListFormatter NSLocale all?
NSLock all?
NSMapTable all?

Affects ns_consumed::NSFreeMapTable

NSMassFormatter NSMeasurement NSMeasurementFormatter NSMetadata all?
NSMetadataAttributes NSMethodSignature NSMorphology NSNetServices all?
NSNotification all?

Affects NSAppleEventManager::NSAppleEventManagerWillProcessFirstEventNotification, NSBundle::NSBundleDidLoadNotification, NSBundle::NSBundleResourceRequestLowDiskSpaceNotification, NSCalendar::NSCalendarDayChangedNotification, NSClassDescription::NSClassDescriptionNeededForClassNotification, NSDate::NSSystemClockDidChangeNotification, NSFileHandle::NSFileHandleReadCompletionNotification, NSFileHandle::NSFileHandleReadToEndOfFileCompletionNotification, NSFileHandle::NSFileHandleConnectionAcceptedNotification, NSFileHandle::NSFileHandleDataAvailableNotification, NSFileManager::NSUbiquityIdentityDidChangeNotification, NSHTTPCookieStorage::NSHTTPCookieManagerAcceptPolicyChangedNotification, NSHTTPCookieStorage::NSHTTPCookieManagerCookiesChangedNotification, NSLocale::NSCurrentLocaleDidChangeNotification, NSMetadata::NSMetadataQueryDidStartGatheringNotification, NSMetadata::NSMetadataQueryGatheringProgressNotification, NSMetadata::NSMetadataQueryDidFinishGatheringNotification, NSMetadata::NSMetadataQueryDidUpdateNotification, NSPort::NSPortDidBecomeInvalidNotification, NSProcessInfo::NSProcessInfoThermalStateDidChangeNotification

NSNotificationQueue NSNull NSNumberFormatter all?
NSObjCRuntime all?

Affects NSDecimal::NSDecimalCompare, NSString::NSCharacterConversionException, NSString::NSParseErrorException, NSDecimalNumber::NSDecimalNumberExactnessException, NSDecimalNumber::NSDecimalNumberOverflowException, NSDecimalNumber::NSDecimalNumberUnderflowException, NSDecimalNumber::NSDecimalNumberDivideByZeroException, NSException::NSGenericException, NSException::NSRangeException, NSException::NSInvalidArgumentException, NSException::NSInternalInconsistencyException, NSException::NSMallocException, NSException::NSObjectInaccessibleException, NSException::NSObjectNotAvailableException, NSException::NSDestinationInvalidException, NSException::NSPortTimeoutException, NSException::NSInvalidSendPortException, NSException::NSInvalidReceivePortException, NSException::NSPortSendException, NSException::NSPortReceiveException

NSObject all?

Affects NSItemProvider::NSItemProviderCompletionHandler, NSItemProvider::NSItemProviderLoadHandler

NSObjectScripting NSOperation NSOrderedCollectionChange all?
NSOrderedCollectionDifference NSOrderedSet NSOrthography all?
NSPathUtilities NSPersonNameComponents all?
NSPersonNameComponentsFormatter NSPointerArray all?
NSPointerFunctions all?

Affects NSHashTable::NSHashTableStrongMemory, NSHashTable::NSHashTableZeroingWeakMemory, NSHashTable::NSHashTableCopyIn, NSHashTable::NSHashTableObjectPointerPersonality, NSHashTable::NSHashTableWeakMemory, NSMapTable::NSMapTableStrongMemory, NSMapTable::NSMapTableZeroingWeakMemory, NSMapTable::NSMapTableCopyIn, NSMapTable::NSMapTableObjectPointerPersonality, NSMapTable::NSMapTableWeakMemory

NSPort NSPortCoder NSPortMessage NSPortNameServer NSPredicate all?
NSProcessInfo NSProgress NSPropertyList NSProtocolChecker NSProxy all?
NSRange NSRegularExpression NSRelativeDateTimeFormatter NSRunLoop all?
NSScanner NSScriptClassDescription NSScriptCoercionHandler all?
NSScriptCommand NSScriptCommandDescription NSScriptExecutionContext all?
NSScriptKeyValueCoding NSScriptObjectSpecifiers all?
NSScriptStandardSuiteCommands NSScriptSuiteRegistry all?
NSScriptWhoseTests all?
NSSet all?

Affects objc2-foundation::set

NSSortDescriptor NSSpellServer NSStream all?
NSString all?

Affects NSAppleScript::NSAppleScriptErrorMessage, NSAppleScript::NSAppleScriptErrorNumber, NSAppleScript::NSAppleScriptErrorAppName, NSAppleScript::NSAppleScriptErrorBriefMessage, NSAppleScript::NSAppleScriptErrorRange, NSAttributedString::NSAttributedStringKey, NSAttributedString::NSAttributedStringFormattingContextKey, NSAttributedString::NSInflectionConceptsKey, NSAttributedString::NSInlinePresentationIntentAttributeName, NSAttributedString::NSAlternateDescriptionAttributeName, NSAttributedString::NSImageURLAttributeName, NSAttributedString::NSLanguageIdentifierAttributeName, NSAttributedString::NSMarkdownSourcePositionAttributeName, NSAttributedString::NSReplacementIndexAttributeName, NSAttributedString::NSMorphologyAttributeName, NSAttributedString::NSInflectionRuleAttributeName, NSAttributedString::NSInflectionAgreementArgumentAttributeName, NSAttributedString::NSInflectionAgreementConceptAttributeName, NSAttributedString::NSInflectionReferentConceptAttributeName, NSAttributedString::NSInflectionAlternativeAttributeName

NSTask NSTermOfAddress NSTextCheckingResult all?
NSThread all?

Affects thread::is_multi_threaded, thread::is_main_thread, thread::run_on_main, thread::MainThreadBound

NSTimeZone NSTimer NSURL NSURLAuthenticationChallenge NSURLCache all?
NSURLConnection NSURLCredential NSURLCredentialStorage all?
NSURLDownload NSURLError NSURLHandle NSURLProtectionSpace all?
NSURLProtocol NSURLRequest NSURLResponse NSURLSession NSUUID all?
NSUbiquitousKeyValueStore NSUndoManager NSUnit NSUserActivity all?
NSUserDefaults NSUserNotification NSUserScriptTask NSValue all?
NSValueTransformer NSXMLDTD NSXMLDTDNode NSXMLDocument all?
NSXMLElement NSXMLNode NSXMLNodeOptions NSXMLParser all?
NSXPCConnection all?
NSZone all?

Affects NSHashTable::NSCopyHashTableWithZone, NSMapTable::NSCopyMapTableWithZone, NSObject::NSAllocateObject, NSObject::NSCopyObject, NSObject::NSShouldRetainWithZone, NSHashTable::NSCreateHashTableWithZone, NSMapTable::NSCreateMapTableWithZone