HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
swiftlang
swift-corelibs-foundation
C2015–2025
swiftlang / swift-corelibs-foundation

swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence

36Distinct people
40Mentions
0Explicit recommenders
5.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The Foundation Project, providing core utilities, internationalization, and OS independence

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 1:57:11 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year40 dated mentions

Observed mentions: 2015-12-03 22:31:05 UTC to 2025-12-24 21:10:16 UTC.

024682015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC211
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC808
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC505
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC404
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC312
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC505
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 12, 2026.

Read the project’s introduction
Foundation The Foundation framework defines a base layer of functionality that is 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. It is designed with these goals in mind: Provide a small set of basic utility classes and data structures. Make software development easier by introducing consistent conventions. Support internationalization and localization, to make software accessible to users around the world. Provide a level of OS independence, to enhance portability. There is more information on the Foundation framework here. 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. Project Navigator Foundation builds in different configurations and is composed of several projects. graph TD; FF[Foundation.framework]-->SF subgraph GitHub SCLF[swift-corelibs-foundation]-->SF SF[swift-foundation]-->FICU[swift-foundation-icu] SF-->SC[swift-collections] end Loading Swift Foundation A 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. swift-foundation depends on a limited set of packages, primarily swift-collections and swift-syntax. Swift Corelibs Foundation A 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. swift-corelibs-foundation builds for non-Darwin platforms only. It installs the Foundation umbrella module, FoundationXML, and FoundationNetworking. Foundation ICU A 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. Foundation Framework A framework 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. Using Foundation Here is a simple main.swift file which uses Foundation. This guide assumes you have already installed a version of the latest Swift binary distribution. import Foundation // Make a URLComponents instance let swifty = URLComponents(string: "https://swift.org")! // Print something useful about the URL print("\(swifty.host!)") // Output: "swift.org" You will want to use the Swift Package Manager to build your Swift apps. Working on Foundation swift-corelibs-foundation builds as a standalone project using Swift Package Manager. Simply use swift build in the root of the checkout to build the project. swift-corelibs-foundation also builds as part of the toolchain for non-Darwin platforms. Instructions on building the toolchain are available in the Swift project. Building swift-corelibs-foundation on Windows When building Foundation as a standalone project, it requires you to provide some dependencies that it will link during the build. SwiftPM already fetches most of these dependencies and on Linux the remaining dependencies (dispatch, zlib, curl, libxml) are found in the Swift toolchain or on the host OS. However, Windows does not ship with zlib/curl/libxml on the host OS. In order to build swift-corelibs-foundation as a package on Windows, you must first checkout and build these dependenies before running swift build as recommended above. To do this, you can build the provided CMake target which (instead of building Foundation via CMake) will checkout and build these 3 dependencies via CMake and provide environment variables that will connect the SwiftPM build to these dependencies. To build these targets, run the following commands: cmake -G Ninja -B <build folder> -DFOUNDATION_SWIFTPM_DEPS=YES cmake --build <build folder> --target --target WindowsSwiftPMDependencies After running these commands, the output will include a list of environment variables to set. After setting these environment variables, you can run swift test/swift build just like on Linux in order to build swift-corelibs-foundation with an existing Swift toolchain. Contributions We welcome contributions to Foundation! Please see the known issues page if you are looking for an area where we need help. We are also standing by on the mailing lists to answer questions about what is most important to do and what we will accept into the project.
Read the full README on GitHub

What Hacker News says

5 sources
It's really coming along now with Swift 4, but it is still (of course) behind the Apple platforms. The "core language" pretty much works great on Ubuttnu, but there are still minor annoyances getting it installed, or building it, on Linux. Other Linux targets, also doable, but more annoying. Windows, I haven't really heard of people doing for real. Not sure that's even on anybody's radar. What's really awesome is how far Swift has come with the core lib Foundation, which is a from-scratch clone of Apple's Objective-C and closed-source macOS/iOS Foundation library[1], written in Swift, in the open. It is not done, but huge swaths of it are now done[2], and that makes coding in Swift on Linux a lot more pleasant, since we don't typically want to waste time rolling our own regex support, Unicode string manipulations, basic geometry routines,
Read the rest
HTTP networking, date formatting, etc. But Foundation is a huge, almost 30-year-old library that has evolved continuously and has shipped with every OS X/macOS/iOS release. An open-source Swift re-implementation of that sounded like "yeah right" bullshit/fantasy when they announced it but now it looks very real just a couple years later. Tooling is different issue, though. Swift is a modern language with excellent support for auto-completion and in-editor hinting and help. People complain about it all the time, but Xcode is so much better than any IDE on Linux (or any other platform) for coding in Swift that I do most of my Swift-on-Linux work using a Mac, with Ubuttnu running in VMWare Fusion. If a basic editor will do, though, you have a lot of choices. For builds and package management, Swift Package Manager is now built into Swift, and works great. (It also has an option to automatically generate Xcode project files from Swift packages, which is hugely useful; my practice, and I think the prevailing or at least emerging convention, is to keep the package and source in git but treat the Xcode project as a throwaway item, not in version control, that can be generated whenever needed. So you don't need Xcode, but its easy to use for editing convenience when you want, assuming you have a Mac. But not all devs need to have Macs.) I think you still have to like Swift a lot to choose it for your Linux project, but it is doable. I'd be surprised if Swift adoption on Linux didn't quintuple or sextuple by the end of 2018. [1]: https://github.com/apple/swift-corelibs-foundation [2]: https://github.com/apple/swift-corelibs-foundation/blob/mast...
In Fun facts about Rust's growing popularity

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.