Files
swift-nio/Sources/CNIOWindows/include/module.modulemap
ad419b56d4 NIO: add module constructor for Windows (#1450)
This adds the necessary code to add a module constructor for NIO.  On
Windows, the socketing subsystem (WinSock) must be explicitly
initialized unlike Unices.  Add a module constructor that will be
handled by the C runtime to initialize the subsystem before the module
code is executed so that the user does not need to worry about this.

Since there is no way to inject this in Swift, write a tiny helper in C
and link that into the final NIO binary.

Since swift-package-manager does not support mixed-language directories,
add this to `CNIOWindows` which will need to be statically linked and
must always be imported as `@_implementationOnly` as this cannot be
linked into any user libraries.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-03-21 17:51:16 +00:00

5 lines
59 B
Plaintext

module CNIOWindows {
header "CNIOWindows.h"
export *
}