Email me

Crate features / objc2-foundation

Feature flags · objc2-foundation 0.3.2 · from crates.io 2026-10-24

objc2-foundation features: what each one does, and the line to copy

Short answerobjc2-foundation 0.3.2 has 185 features. By default it turns on std, 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, NSDebug, 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, NSKeyValueSharedObservers, NSKeyedArchiver, NSLengthFormatter, NSLinguisticTagger, NSListFormatter, NSLocale, NSLocalizedNumberFormatRule, 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, bitflags, block2, libc, objc2-core-foundation; add default-features = false to start from nothing. It needs Rust 1.71 or newer.

Pick features

0.3.2latest version
185features
5optional dependencies
1.71MSRV (rust-version)

Every feature

FeatureIn defaultTurns on
FoundationErrorsyesnothing else (a switch the code checks)
FoundationLegacySwiftCompatibilityyesnothing else (a switch the code checks)
NSAffineTransformyesnothing else (a switch the code checks)
NSAppleEventDescriptoryesbitflags
NSAppleEventManageryesnothing else (a switch the code checks)
NSAppleScriptyesnothing else (a switch the code checks)
NSArchiveryesnothing else (a switch the code checks)
NSArrayyesbitflags
NSAttributedStringyesbitflags
NSAutoreleasePoolyesnothing else (a switch the code checks)
NSBackgroundActivityScheduleryesnothing else (a switch the code checks)
NSBundleyesnothing else (a switch the code checks)
NSByteCountFormatteryesbitflags
NSByteOrderyesnothing else (a switch the code checks)
NSCacheyesnothing else (a switch the code checks)
NSCalendaryesbitflags
NSCalendarDateyesnothing else (a switch the code checks)
NSCharacterSetyesnothing else (a switch the code checks)
NSClassDescriptionyesnothing else (a switch the code checks)
NSCoderyesnothing else (a switch the code checks)
NSComparisonPredicateyesbitflags
NSCompoundPredicateyesnothing else (a switch the code checks)
NSConnectionyesnothing else (a switch the code checks)
NSDatayesbitflags
NSDateyesnothing else (a switch the code checks)
NSDateComponentsFormatteryesbitflags
NSDateFormatteryesnothing else (a switch the code checks)
NSDateIntervalyesnothing else (a switch the code checks)
NSDateIntervalFormatteryesnothing else (a switch the code checks)
NSDebugyesnothing else (a switch the code checks)
NSDecimalyesnothing else (a switch the code checks)
NSDecimalNumberyesnothing else (a switch the code checks)
NSDictionaryyesnothing else (a switch the code checks)
NSDistantObjectyesnothing else (a switch the code checks)
NSDistributedLockyesnothing else (a switch the code checks)
NSDistributedNotificationCenteryesbitflags
NSEnergyFormatteryesnothing else (a switch the code checks)
NSEnumeratoryesnothing else (a switch the code checks)
NSErroryesnothing else (a switch the code checks)
NSExceptionyesnothing else (a switch the code checks)
NSExpressionyesnothing else (a switch the code checks)
NSExtensionContextyesnothing else (a switch the code checks)
NSExtensionItemyesnothing else (a switch the code checks)
NSExtensionRequestHandlingyesnothing else (a switch the code checks)
NSFileCoordinatoryesbitflags
NSFileHandleyesnothing else (a switch the code checks)
NSFileManageryesbitflags
NSFilePresenteryesnothing else (a switch the code checks)
NSFileVersionyesbitflags
NSFileWrapperyesbitflags
NSFormatteryesnothing else (a switch the code checks)
NSGarbageCollectoryesnothing else (a switch the code checks)
NSGeometryyesbitflags
NSHFSFileTypesyesnothing else (a switch the code checks)
NSHTTPCookieyesnothing else (a switch the code checks)
NSHTTPCookieStorageyesnothing else (a switch the code checks)
NSHashTableyesnothing else (a switch the code checks)
NSHostyesnothing else (a switch the code checks)
NSISO8601DateFormatteryesbitflags
NSIndexPathyesnothing else (a switch the code checks)
NSIndexSetyesnothing else (a switch the code checks)
NSInflectionRuleyesnothing else (a switch the code checks)
NSInvocationyesnothing else (a switch the code checks)
NSItemProvideryesbitflags
NSJSONSerializationyesbitflags
NSKeyValueCodingyesnothing else (a switch the code checks)
NSKeyValueObservingyesbitflags
NSKeyValueSharedObserversyesnothing else (a switch the code checks)
NSKeyedArchiveryesnothing else (a switch the code checks)
NSLengthFormatteryesnothing else (a switch the code checks)
NSLinguisticTaggeryesbitflags
NSListFormatteryesnothing else (a switch the code checks)
NSLocaleyesnothing else (a switch the code checks)
NSLocalizedNumberFormatRuleyesnothing else (a switch the code checks)
NSLockyesnothing else (a switch the code checks)
NSMapTableyesnothing else (a switch the code checks)
NSMassFormatteryesnothing else (a switch the code checks)
NSMeasurementyesNSUnit
NSMeasurementFormatteryesbitflags
NSMetadatayesnothing else (a switch the code checks)
NSMetadataAttributesyesnothing else (a switch the code checks)
NSMethodSignatureyesnothing else (a switch the code checks)
NSMorphologyyesnothing else (a switch the code checks)
NSNetServicesyesbitflags
NSNotificationyesnothing else (a switch the code checks)
NSNotificationQueueyesbitflags
NSNullyesnothing else (a switch the code checks)
NSNumberFormatteryesnothing else (a switch the code checks)
NSObjCRuntimeyesbitflags
NSObjectyesnothing else (a switch the code checks)
NSObjectScriptingyesnothing else (a switch the code checks)
NSOperationyesnothing else (a switch the code checks)
NSOrderedCollectionChangeyesnothing else (a switch the code checks)
NSOrderedCollectionDifferenceyesbitflags
NSOrderedSetyesnothing else (a switch the code checks)
NSOrthographyyesnothing else (a switch the code checks)
NSPathUtilitiesyesbitflags
NSPersonNameComponentsyesnothing else (a switch the code checks)
NSPersonNameComponentsFormatteryesbitflags
NSPointerArrayyesnothing else (a switch the code checks)
NSPointerFunctionsyesbitflags
NSPortyesbitflags
NSPortCoderyesnothing else (a switch the code checks)
NSPortMessageyesnothing else (a switch the code checks)
NSPortNameServeryesnothing else (a switch the code checks)
NSPredicateyesnothing else (a switch the code checks)
NSProcessInfoyesbitflags
NSProgressyesnothing else (a switch the code checks)
NSPropertyListyesbitflags
NSProtocolCheckeryesnothing else (a switch the code checks)
NSProxyyesnothing else (a switch the code checks)
NSRangeyesnothing else (a switch the code checks)
NSRegularExpressionyesbitflags
NSRelativeDateTimeFormatteryesnothing else (a switch the code checks)
NSRunLoopyesnothing else (a switch the code checks)
NSScanneryesnothing else (a switch the code checks)
NSScriptClassDescriptionyesnothing else (a switch the code checks)
NSScriptCoercionHandleryesnothing else (a switch the code checks)
NSScriptCommandyesnothing else (a switch the code checks)
NSScriptCommandDescriptionyesnothing else (a switch the code checks)
NSScriptExecutionContextyesnothing else (a switch the code checks)
NSScriptKeyValueCodingyesnothing else (a switch the code checks)
NSScriptObjectSpecifiersyesnothing else (a switch the code checks)
NSScriptStandardSuiteCommandsyesnothing else (a switch the code checks)
NSScriptSuiteRegistryyesnothing else (a switch the code checks)
NSScriptWhoseTestsyesnothing else (a switch the code checks)
NSSetyesnothing else (a switch the code checks)
NSSortDescriptoryesnothing else (a switch the code checks)
NSSpellServeryesnothing else (a switch the code checks)
NSStreamyesbitflags
NSStringyesbitflags
NSTaskyesnothing else (a switch the code checks)
NSTermOfAddressyesnothing else (a switch the code checks)
NSTextCheckingResultyesbitflags
NSThreadyesnothing else (a switch the code checks)
NSTimeZoneyesnothing else (a switch the code checks)
NSTimeryesnothing else (a switch the code checks)
NSURLyesbitflags
NSURLAuthenticationChallengeyesnothing else (a switch the code checks)
NSURLCacheyesnothing else (a switch the code checks)
NSURLConnectionyesnothing else (a switch the code checks)
NSURLCredentialyesnothing else (a switch the code checks)
NSURLCredentialStorageyesnothing else (a switch the code checks)
NSURLDownloadyesnothing else (a switch the code checks)
NSURLErroryesnothing else (a switch the code checks)
NSURLHandleyesnothing else (a switch the code checks)
NSURLProtectionSpaceyesnothing else (a switch the code checks)
NSURLProtocolyesnothing else (a switch the code checks)
NSURLRequestyesnothing else (a switch the code checks)
NSURLResponseyesnothing else (a switch the code checks)
NSURLSessionyesnothing else (a switch the code checks)
NSUUIDyesnothing else (a switch the code checks)
NSUbiquitousKeyValueStoreyesnothing else (a switch the code checks)
NSUndoManageryesnothing else (a switch the code checks)
NSUnityesnothing else (a switch the code checks)
NSUserActivityyesnothing else (a switch the code checks)
NSUserDefaultsyesnothing else (a switch the code checks)
NSUserNotificationyesnothing else (a switch the code checks)
NSUserScriptTaskyesnothing else (a switch the code checks)
NSValueyesnothing else (a switch the code checks)
NSValueTransformeryesnothing else (a switch the code checks)
NSXMLDTDyesnothing else (a switch the code checks)
NSXMLDTDNodeyesnothing else (a switch the code checks)
NSXMLDocumentyesnothing else (a switch the code checks)
NSXMLElementyesnothing else (a switch the code checks)
NSXMLNodeyesnothing else (a switch the code checks)
NSXMLNodeOptionsyesbitflags
NSXMLParseryesnothing else (a switch the code checks)
NSXPCConnectionyesbitflags
NSZoneyesnothing else (a switch the code checks)
allocnothing else (a switch the code checks)
bitflagsyesdep:bitflags
block2yesdep:block2
gnustep-1-7objc2/gnustep-1-7, block2?/gnustep-1-7
gnustep-1-8gnustep-1-7, objc2/gnustep-1-8, block2?/gnustep-1-8
gnustep-1-9gnustep-1-8, objc2/gnustep-1-9, block2?/gnustep-1-9
gnustep-2-0gnustep-1-9, objc2/gnustep-2-0, block2?/gnustep-2-0
gnustep-2-1gnustep-2-0, objc2/gnustep-2-1, block2?/gnustep-2-1
libcyesdep:libc
objc2-core-foundationyesdep:objc2-core-foundation
objc2-core-servicesdep:objc2-core-services
stdyesalloc
unstable-darwin-objcnothing else (a switch the code checks)
unstable-mutation-return-nullNSNull
unstable-static-nsstringnothing else (a switch the code checks)

dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).

MSRV history

The minimum Rust version objc2-foundation declares (rust-version), and the release that changed it:

  • 0.2.0 (2024-04-17): Rust 1.60
  • 0.3.0 (2025-01-22): Rust 1.71

Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p objc2-foundation --precise <version>, or use resolver 3, which picks compatible versions for you.

More on objc2-foundation

Real downloads, dependents and alternatives: objc2-foundation crate data (520.5K real downloads a day, 1,007 dependents).

docs.rs feature list · crates.io · license MIT · edition 2021

Up next

Before you depend on itobjc2-foundation crate dataReal downloads, dependents, alternatives.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ