This is a system module that allows Swift Package Manager projects to use libwebsockets. To use this module, you must download & install libwebsockets from https://github.com/warmcat/libwebsockets.
macOS and Linux
The following packages must be present and marked as dependencies to allow Xcode and Swift Package manager to compile:
Alternatively, the following arguments can be used in place of the COpenSSL, Clibuv, and Clibevent dependencies (will only work from the command line, not Xcode):
This command assumes that you used vcpkg and that libwebsockets is present at C:\SourceCache. Please note that error: Error Domain=NSCocoaErrorDomain Code=256 "(null)" due to a bug in Swift, but the compile will complete properly.
Clibwebsockets
A Swift system module for libwebsockets
This is a system module that allows Swift Package Manager projects to use
libwebsockets. To use this module, you must download & install libwebsockets from https://github.com/warmcat/libwebsockets.macOS and Linux
The following packages must be present and marked as dependencies to allow Xcode and Swift Package manager to compile:
Alternatively, the following arguments can be used in place of the
COpenSSL,Clibuv, andClibeventdependencies (will only work from the command line, not Xcode):Please note that
swift buildwill not work withoutCOpenSSL,Clibuv, andClibeventdependencies or the arguments above.Windows
Swift must be installed according to the Swift Getting Started. To build libwebsockets, vcpkg is recommended. For example:
To compile your Swift project,
swift buildis not enough. The libraries must be linked against:This command assumes that you used vcpkg and that libwebsockets is present at
C:\SourceCache. Please note thaterror: Error Domain=NSCocoaErrorDomain Code=256 "(null)"due to a bug in Swift, but the compile will complete properly.