Where can I find document for `Cxx` and `CxxStdlib`?

Hi,

I'm new to learn swift and especially I'm interested in the c++ interoperability introduced in swift v5.9.

Sometimes I read code like this:

import Cxx
import CxxStdlib

or on Windows, I read code like import WinSDK.

I would like to check what's inside the module of Cxx and CxxStdlib and also WinSDK, is there any document for it?

I'm not sure where their source code is, maybe swift/stdlib/public/Cxx/CMakeLists.txt at main · apple/swift (github.com) ? will it be helpful to understand those modules?

You may have figured it out already, but I found this thread through search results, so answering for others who do the same in the future.

CxxStdlib is the Swift module containing the declarations imported from the C++ standard library – stuff in the std namespace.

Cxx is a Swift stdlib module containing things that are useful for C++ interop. For example CxxSpan<T> and CxxMutableSpan<T> are protocols that are implemented by std::span<const T> and std::span<T>, respectively. They contain initializers that make it easy to convert to std::span from Unsafe[Mutable]BufferPointer and [Mutable]Span.

WinSDK is the Windows SDK module, similar to importing Darwin on macOS etc. Along with the CRT module it provides platform specific things on Windows. In Swift code that needs to interact with the system through C APIs you’ll often see something like:

```

#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(Windows)
import WinSDK
#endif

For more information, see Mixing Swift and C++ | Swift.org