| layout | title |
|---|---|
page |
Foundation on Linux |
As a core library which underpins many Swift packages, the Foundation project is a key part of the overall swift.org ecosystem. Foundation provides a baseline of fundamental types and functionality which is useful to all applications and can be implemented on a broad range of platforms and operating systems.
Since Swift became open source in 2015 the community has worked together to improve the implementation of Foundation on Linux and the project has progessed significantly.
(Data generated from git using this script)
Development of Foundation is coordinated on the swift-corelibs-dev mailing list, where the community can help new contributors.
The tables below show the current status of each component in Foundation. Areas particularly suited to new contributors are highlighted in bold, and contributions from the community are actively encouraged.
-
Runtime: base functionality.
The classes and methods in this group provide an interface for interoperability between C code and Swift. They also provide common layers used throughout the framework such as the root class
NSObject.Name Status Notes NSEnumeratorComplete NSGetSizeAndAlignmentComplete NSStringFromClassandNSClassFromStringMostly complete NSObjectComplete -
URL: Networking primitives.
Functionality for manipulating URLs and paths via a common model object. The group also has classes for creating and receiving network connections.
Entity Name Status Notes URLAuthenticationChallengeUnimplemented URLCacheUnimplemented URLCredentialComplete URLCredentialStorageUnimplemented NSURLError*Complete URLProtectionSpaceUnimplemented URLProtocolUnimplemented URLProtocolClientUnimplemented NSURLRequestMostly Complete NSMutableURLRequestMostly Complete URLResponseMostly Complete NSHTTPURLResponseMostly Complete NSURLMostly Complete Resource values are unimplemented NSURLQueryItemMostly Complete URLResourceKeyComplete URLFileResourceTypeComplete URLComplete URLResourceValuesComplete URLComponentsComplete URLRequestComplete HTTPCookieComplete HTTPCookiePropertyKeyComplete HTTPCookieStorageUnimplemented HostComplete URLSessionMostly Complete shared, invalidation, resetting, flushing, getting tasks, and others are unimplementedURLSessionConfigurationMostly Complete ephemeralandbackground(withIdentifier:)are unimplementedURLSessionDelegateComplete URLSessionTaskMostly Complete cancel(),createTransferState(url:)with streams, and others are unimplementedURLSessionDataTaskComplete URLSessionUploadTaskComplete URLSessionDownloadTaskIncomplete cancel(byProducingResumeData:)is unimplementedURLSessionStreamTaskUnimplemented -
Formatters: Locale and language-correct formatted values.
This group contains the is the base
NSFormatterclass and its subclasses. These formatters can be used for dates, numbers, sizes, energy, and many other types.Entity Name Status Notes DateComponentFormatterUnimplemented DateIntervalFormatterUnimplemented EnergyFormatterUnimplemented ISO8601DateFormatterComplete LengthFormatterComplete MassFormatterComplete NumberFormatterMostly Complete objectValue(_:range:)remains unimplementedPersonNameComponentsFormatterUnimplemented ByteCountFormatterComplete DateFormatterMostly Complete objectValue(_:range:)remain unimplementedFormatterComplete MeasurementFormatterUnimplemented -
Predicates: Base functionality for building queries.
This is the base class and subclasses for
NSPredicateandNSExpression.Entity Name Status Notes NSExpressionUnimplemented NSComparisonPredicateUnimplemented NSCompoundPredicateComplete NSPredicateIncomplete Only boolean and block evaluations are implemented; all else remains unimplemented -
Serialization: Serialization and deserialization functionality.
The classes in this group perform tasks like parsing and writing JSON, property lists and binary archives.
Entity Name Status Notes NSJSONSerializationMostly Complete jsonObject(with:options:)with streams remains unimplementedNSKeyedArchiverComplete NSKeyedUnarchiverMostly Complete decodingFailurePolicy.setremains unimplementedNSCoderIncomplete Decoding methods which require a concrete implementation are unimplemented PropertyListSerializationComplete -
XML: A group of classes for parsing and representing XML documents and elements.
The classes provided in this group are responsible for parsing and validating XML. They should be an interface for representing libxml2 in a more object-oriented manner.
Entity Name Status Notes XMLDocumentMostly Complete init(),replacementClass(for:), andobject(byApplyingXSLT...)are unimplementedXMLDTDMostly Complete init()is unimplementedXMLDTDNodeComplete XMLElementIncomplete init(xmlString:),elements(forLocalName:uri:),attribute(forLocalName:uri:), namespace support, and others are unimplementedXMLNodeIncomplete localName(forName:),prefix(forName:),predefinedNamespace(forPrefix:), and others are unimplementedXMLParserComplete -
Collections: A group of classes to contain objects.
The classes provided in this group provide basic collections. The primary role for these classes is to provide an interface layer between the CoreFoundation implementations and the standard library implementations. Additionally, they have useful extras like serialization support. There are also additional collection types that the standard library does not support.
Note: See Known Issues for more information about bridging between Foundation collection types and Swift standard library collection types.
Entity Name Status Notes NSOrderedSetMostly Complete NS[Mutable]Copying, andarray&set(and associated indexing methods) are unimplementedNSMutableOrderedSetMostly Complete NSCodingandsortRange(_:options:, usingComparator:)with non-empty options remain unimplementedNSIndexSetMostly Complete NSCoding,NSCopying, and concurrentenumerateWithOptions(_:range:paramType:returnType:block:)remain unimplementedNSMutableIndexSetMostly Complete shiftIndexesStarting(at:by:)remains unimplementedIndexSetComplete NSIndexPathMostly Complete NSCoding,NSCopying,getIndexes(_:)remain unimplementedIndexPathComplete NSArrayMostly Complete Reading/writing to files/URLs, concurrent enumerateObjects(at:options:using:), andsortedArray(from:options:usingComparator:)with options remain unimplementedNSMutableArrayMostly Complete exchangeObject(at:withObjectAt:)andreplaceObjects(in:withObjectsFromArray:)remain unimplemented for types other thanNSMutableArrayNSDictionaryMostly Complete NSCodingwith non-keyed-coding archivers,descriptionInStringsFileFormat,sharedKeySet(forKeys:), and reading/writing to files/URLs remain unimplementedNSMutableDictionaryMostly Complete descriptionInStringsFileFormat,sharedKeySet(forKeys:), and reading/writing to files/URLs remain unimplementedNSSetMostly Complete description(withLocale:)andcustomMirrorremain unimplementedNSMutableSetMostly Complete NSCountedSetMostly Complete NSCacheComplete NSSortDescriptorUnimplemented -
RunLoop: Timers, streams and run loops.
The classes in this group provide support for scheduling work and acting upon input from external sources.
Entity Name Status Notes PortUnimplemented MessagePortUnimplemented SocketPortUnimplemented PortMessageUnimplemented RunLoopMostly Complete add(_:forMode:)andremove(_:forMode:)are unimplementedNSStreamMostly Complete StreamUnimplemented Methods which require a concrete implementation remain unimplemented InputStreamMostly Complete getBuffer(_:length:)remains unimplementedNSOutputStreamComplete TimerComplete -
String: A set of classes for scanning, manipulating and storing string values.
The NSString implementation is present to provide an interface layer between CoreFoundation and Swift, but it also adds additional functionality on top of the Swift standard library String type. Other classes in this group provide mechanisms to scan, match regular expressions, store attributes in run arrays attached to strings, and represent sets of characters.
Note: See Known Issues for more information about bridging between the Foundation NSString types and Swift standard library String type.
Entity Name Status Notes NSRegularExpressionComplete ScannerMostly Complete NSTextCheckingResultMostly Complete NSAttributedStringIncomplete NSMutableAttributedStringUnimplemented NSCharacterSetMostly Complete NSMutableCharacterSetMostly Complete CharacterSetComplete NSStringMostly Complete init(contentsOf:usedEncoding:),enumerateSubstrings(in:options:using:)are unimplementedNSStringEncodingsComplete NSStringAPIN/A ExtraStringAPIsComplete -
Number: A set of classes and methods for representing numeric values and structures.
Entity Name Status Notes NSRangeComplete DecimalUnimplemented NSDecimalNumberUnimplemented NSDecimalNumberHandlerUnimplemented CGPointComplete CGSizeComplete CGRectComplete NSEdgeInsetsMostly Complete NSGeometryMostly Complete CGFloatComplete AffineTransformComplete NSAffineTransformComplete NSNumberComplete NSValueComplete NSMeasurementUnimplemented MeasurementComplete UnitConverterComplete UnitConverterLinearComplete UnitComplete DimensionComplete UnitAccelerationComplete UnitAngleComplete UnitAreaComplete UnitConcentrationMassComplete UnitDispersionComplete UnitDurationComplete UnitElectricChargeComplete UnitElectricCurrentComplete UnitElectricPotentialDifferenceComplete UnitElectricResistanceComplete UnitEnergyComplete UnitFrequencyComplete UnitFuelEfficiencyComplete UnitLengthComplete UnitIlluminanceComplete UnitMassComplete UnitPowerComplete UnitPressureComplete UnitSpeedComplete UnitTemperatureComplete UnitVolumeComplete -
UserDefaults: A mechanism for storing values to persist as user settings and local.
Entity Name Status Notes UserDefaultsIncomplete Domain support, and forced objects are unimplemented. Unit tests are currently commented out NSLocaleComplete LocaleComplete -
OS: Mechanisms for interacting with the operating system on a file system level as well as process and thread level
Entity Name Status Notes FileHandleMostly Complete NSCoding, and background operations are unimplementedPipeComplete FileManagerIncomplete URL searches, relationship lookups, item copying, cross-device moving, recursive linking, and others are unimplemented ProcessMostly Complete interrupt(),terminate(),suspend(), andresume()are unimplementedBundleMostly Complete allBundles,init(for:),classNamed(), andprincipalClassremain unimplementedProcessInfoComplete ThreadComplete OperationComplete BlockOperationComplete OperationQueueComplete LockMostly Complete lock(before:)remains unimplementedConditionLockComplete RecursiveLockMostly Complete lock(before:)remains unimplementedConditionComplete -
DateTime: Classes for representing dates, timezones, and calendars.
Entity Name Status Notes NSCalendarComplete autoupdatingCurrentandenumerateDatesare unimplementedNSDateComponentsComplete CalendarComplete DateComponentsComplete NSDateComplete NSDateIntervalComplete DateIntervalComplete DateComplete NSTimeZoneMostly Complete local,timeZoneDataVersionand settingabbreviationDictionaryremain unimplementedTimeZoneComplete -
Notifications: Classes for loosely coupling events from a set of many observers.
Entity Name Status Notes NSNotificationComplete NotificationCenterMostly Complete Adding observers to non- nilqueues remains unimplementedNotificationComplete NotificationQueueComplete -
Model: Representations for abstract model elements like null, data, and errors.
Entity Name Status Notes NSNullComplete NSDataComplete NSMutableDataComplete DataComplete NSProgressComplete NSErrorComplete NSUUIDComplete UUIDComplete NSPersonNameComponentsComplete PersonNameComponentsComplete

