Source of truth for list of Standard Library standalone modules?

Is there a definitive list or way of easily determining the list of Standard Library standalone modules?

  • The RegexBuilder module was added by SE-0351 implemented in 5.7.

  • The Synchronization module was added by SE-0410 is coming in 6.0.

Is there a way to derive the list of publicly available standalone modules considered to be part of the Standard Library?


you could try intentionally failing swift symbolgraph-extract, which ought to print a list of all the modules in the default search path

Depending on your definition of a standard library module there could be a few lists. For example, _Concurrency is technically a stdlib module, it's just implicitly imported for you. There are also some C modules that are exposed as importable Swift modules like Darwin, Glibc, etc. That said, these are all of the Swift/C modules that exist in the standard library:

Swift, _Backtracing, _Concurrency, Cxx, CxxStdlib, Observation, Darwin / Glibc / CRT / WinSDK / Musl / WASILibc, RegexBuilder, _StringProcessing, and Synchronization.

I believe that's all of them (or at least most of the them, there are a couple of others I didn't include just because they aren't usable outside of the stdlib etc.)