[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7097":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},7097,"swift-foundation","swiftlang\u002Fswift-foundation","swiftlang","The Foundation project","",null,"Swift",2654,241,136,144,0,3,12,1,29.15,"Apache License 2.0",false,"main",[],"2026-06-12 02:01:34","# Foundation\n\nFoundation provides a base layer of functionality useful in many applications, including fundamental types for numbers, data, collections, and dates, as well as functions for task management, file system access, and more.\n\nIt is designed with these goals in mind:\n\n* Provide a small set of basic utility types\n* Enable a level of platform independence, to enhance portability\n* Demonstrate useful conventions that can be widely adopted by the Swift ecosystem\n* Support internationalization and localization to make software accessible around the world\n\nThis project, `swift-foundation`, provides a shared implementation of key Foundation API for all platforms.\n\nOn macOS, iOS, and other Apple platforms, apps should use the Foundation that comes with the operating system. The Foundation framework includes this code.\n\nOn all other Swift platforms, `swift-foundation` is available as part of the toolchain. Simply `import FoundationEssentials` or `import FoundationInternationalization` to use its API. It is also re-exported from [swift-corelibs-foundation](http:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-corelibs-foundation)'s `Foundation`, `FoundationXML`, and `FoundationNetworking` modules.\n\n## Obtaining Foundation\n\nFoundation is available in several forms — built into the OS on Apple platforms,\nincluded in Swift toolchains, and as a Swift package. For guidance on which to\nuse and the tradeoffs involved, see [Distributions.md](Distributions.md).\n\n> [!IMPORTANT]\n> The swift-foundation package is intended to support development and testing of\n> Foundation itself. It is not supported for use as a package dependency in\n> other shipping projects. Prefer the built-in copy of Foundation that ships with \n> your toolchain or operating system instead.\n\n## Building and Testing\n\n> [!NOTE]\n> Building swift-foundation requires the in-development Swift 6.2 toolchain. You can download the Swift 6.2 nightly toolchain from [the Swift website](https:\u002F\u002Fswift.org\u002Finstall).\n\nBefore building Foundation, first ensure that you have a Swift toolchain installed. Next, check out the _Getting Started_ section of the [Foundation Build Process](Foundation_Build_Process.md#getting-started) guide for detailed steps on building and testing.\n\n\n## Project Navigator\n\nFoundation builds in different configurations and is composed of several projects.\n\n```mermaid\n  graph TD;\n      FF[Foundation.framework]-->SF\n      subgraph GitHub\n        SCLF[swift-corelibs-foundation]-->SF\n        SF[swift-foundation]-->FICU[swift-foundation-icu]\n        SF-->SC[swift-collections]\n      end   \n```\n\n### Swift Foundation\n\nA shared library shipped in the Swift toolchain, written in Swift. It provides the core implementation of many key types, including `URL`, `Data`, `JSONDecoder`, `Locale`, `Calendar`, and more in the `FoundationEssentials` and `FoundationInternationalization` modules. Its source code is shared across all platforms.\n\n_swift-foundation_ depends on a limited set of packages, primarily [swift-collections](http:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-collections) and [swift-syntax](http:\u002F\u002Fgithub.com\u002Fswiftlang\u002Fswift-syntax).\n\n### Swift Corelibs Foundation\n\nA shared library shipped in the Swift toolchain. It provides compatibility API for clients that need pre-Swift API from Foundation. It is written in Swift and C. It provides, among other types, `NSObject`, class-based data structures, `NSFormatter`, and `NSKeyedArchiver`. It re-exports the `FoundationEssentials` and `FoundationInternationalization` modules, allowing compatibility for source written before the introduction of the _swift-foundation_ project. As these implementations are distinct from those written in Objective-C, the compatibility is best-effort only.\n\n[swift-corelibs-foundation](http:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-corelibs-foundation) builds for non-Darwin platforms only. It installs the `Foundation` umbrella module, `FoundationXML`, and `FoundationNetworking`.\n\n### Foundation ICU\n\nA private library for Foundation, wrapping ICU. Using a standard version of ICU provides stability in the behavior of our internationalization API, and consistency with the latest releases on Darwin platforms. It is imported from the `FoundationInternationalization` module only. Clients that do not need API that relies upon the data provided by ICU can import `FoundationEssentials` instead.\n\n### Foundation Framework\n\nA [framework](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Farchive\u002Fdocumentation\u002FMacOSX\u002FConceptual\u002FBPFrameworks\u002FFrameworks.html) built into macOS, iOS, and all other Darwin platforms. It is written in a combination of C, Objective-C, and Swift. The Foundation framework compiles the sources from _swift-foundation_ into its binary and provides one `Foundation` module that contains all features.\n\n## Governance\n\nFoundation's goal is to create the best fundamental data types and internationalization features, and make them available to Swift developers everywhere. It takes advantage of emerging features in the language as they are added, and enables library and app authors to build higher level API with confidence.\n\nThis project is part of the overall [Swift project](https:\u002F\u002Fswift.org). It has a workgroup to (a) oversee [community API proposals](Evolution.md) and (b) to closely coordinate with developments in the Swift project and Apple platforms. The workgroup meets regularly to review proposals, look at emerging trends in the Swift ecosystem, and discuss how the library should evolve.\n\n## Contributions\n\nFoundation welcomes contributions from the community, including bug fixes, tests, documentation, and ports to new platforms.\n\nWe use the [Swift forums for discussion](https:\u002F\u002Fforums.swift.org\u002Fc\u002Frelated-projects\u002Ffoundation\u002F99) and [GitHub Issues](https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-foundation\u002Fissues) for tracking bugs, feature requests, and other work.\n\nPlease see the [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-foundation\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) document for more information, including the process for accepting community contributions for new API in Foundation.\n","swift-foundation 是一个为多种应用程序提供基础功能的项目，支持 Swift 语言。其核心功能包括基本类型（如数字、数据、集合和日期）以及任务管理、文件系统访问等功能，并致力于提供一组小型的基本实用类型，增强跨平台兼容性，展示可广泛采用的最佳实践，并支持国际化与本地化。适用于需要在非 Apple 平台上使用 Foundation 框架 API 的场景，或者是在开发和测试 Foundation 本身时。通过 `import FoundationEssentials` 或 `import FoundationInternationalization` 即可引入相关功能。注意，对于最终发布的项目，推荐使用操作系统或工具链自带的 Foundation 版本。",2,"2026-06-11 03:10:29","top_language"]