Frequently Asked Questions
How do I use 3rd party libraries/frameworks?
As of Plain Swift version 1.10, use the Modules | Install Swift Modules... menu command. It supports 3rd party modules built with Swift Package Manager or any other build tool. The only requirement is that they must be compiled as a dynamic libraries with .swiftmodule, .swiftdoc, .lib and .dll files. You can then import the installed module in source code into any Plain Swift project:
What services are started by Plain Swift when I create or open a project?
Plain Swift runs Swift Language Server (sourcekit-lsp.exe). It's part of the official Swift compiler from swift.org. It provides inline code suggestions.
Why does my CPU usage noticeably increase after I create or open a project?
This is caused by a bug in Swift Language Server (sourcekit-lsp.exe) introduced in Swift v5.9 and not yet fixed. Hopefully the bug will be fixed in the next release of the Swift compiler. As a workaround, if you don't mind using an older version of the Swift compiler, you can install version 5.8.1.
What version of Swift compiler is installed by the Plain Swift installer?
Why does Plain Swift install Microsoft Visual Studio?
Plain Swift does not have a built-in Swift compiler. Instead it relies on the official Swift compiler from swift.org. Some Microsoft Visual Studio components are required for the Swift compiler to work. Plain Swift installs only the required Visual Studio components: Build tools and Windows SDK.
Plain Swift installs Windows 11 SDK. Can I use it under Windows 10?
Yes. The Windows App SDK provides a unified set of APIs and tools that are decoupled from the OS. These APIs and tools can be used in a consistent way by any desktop app on Windows 11 and downlevel to Windows 10, version 1809.
Does Plain Swift use the Swift Package Manager?
No. Plain Swift is itself a build system alternative to Swift Package Manager. It uses the Swift Compiler (swiftc.exe) for compilation. Though you can see the Package.swift file in your project folder, it is considered a temporary helper file, required only for Language Server (sourcekit-lsp.exe) to work. Language Server provides inline code suggestions.
Can I modify the Package.swift file in my project?
No. Plain Swift does not use the Swift Package Manager, and your modifications won't work. See previous question.
Why doesn't Plain Swift use the Swift Package Manager?
There are several reasons:
- The development of Plain Swift began at a time when the Swift Package Manager was buggy and limited on Windows platform, if worked at all.
- Swift Package Manager adds unnecessary complexity, while Plain Swift is designed with the KISS principle in mind.
- Swift Package Manager relies heavily on online git repositories. These are moving targets. Just because they are compatible with your project today (and if they are available at all), doesn't mean they will be the same tomorrow. This is absolutely unacceptable if you want a reliable build system with predictable build results.
- Using Swift Compiler (swiftc.exe) as opposed to Package Manager allows more fine grained tuning for the resulting executable, e.g. linking resource files (app icon, version info, and other resources), or creating a Windows GUI app (and not a console app), etc. All this may be implemented in the future, provided there is sufficient support for the project.