With Swift 6, Foundation now has a single, unified implementation across every supported platform. This modern, portable, fully open-source version of Foundation delivers consistent behavior, improved reliability, and better performance everywhere Swift runs. Apple platforms began adopting the Swift-native Foundation in Swift 5.9, and Swift 6 extends this same implementation to Linux and Windows.
Core types—including JSONDecoder, URL, Calendar, FileManager, ProcessInfo, and many others—have been completely rewritten in Swift. These implementations are shared with macOS 15 and iOS 18, creating a new level of cross-platform alignment. Recently introduced APIs like FormatStyle, ParseStrategy, Predicate, and JSON5 are now available universally as well. Swift 6 also debuts new Foundation capabilities—such as the Expression API, enhanced calendar enumeration, recurrence rules, and expanded format-style features—shipping simultaneously on macOS, iOS, Linux, and Windows, all developed with input from the Swift community.
If your Linux or Windows apps already import Foundation from the Swift toolchain, you’ll automatically benefit from these improvements. And for projects where binary size is critical, Swift 6 introduces FoundationEssentials, a lightweight subset of Foundation that excludes internationalization and localization data while retaining core functionality.
