swiftlang/swift-corelibs-foundation
FreeThe Foundation Project, providing core utilities, internationalization, and OS independence
About swiftlang/swift-corelibs-foundation
The Foundation framework defines a base layer of functionality required for almost all applications. It provides primitive classes and introduces several paradigms that define functionality not provided by either the Objective-C runtime and language or Swift standard library and language. This project, swift-corelibs-foundation, provides a compatibility implementation of the Foundation API for platforms where there is no Objective-C runtime. On macOS, iOS, and other Apple platforms, apps should use the Foundation that comes with the operating system. The project is composed of swift-foundation (core implementation of key types like URL, Data, JSONDecoder, Locale, Calendar), Swift Corelibs Foundation (compatibility API for pre-Swift API, providing NSObject, class-based data structures, NSFormatter, NSKeyedArchiver), and Foundation ICU (private library wrapping ICU).
Key Features
Pros & Cons
- Open source and free
- Part of the official Swift ecosystem
- Provides OS independence and portability
- Comprehensive internationalization support
- Includes both modern swift-foundation and compatibility layers
- Best-effort compatibility with Objective-C Foundation (not a drop-in replacement)
- Not intended for use on Apple platforms (use native Foundation)
- May have performance or behavior differences from Apple's Foundation
- Requires ICU library for some internationalization features