You might think that Apple’s Swift is a programming language for macOS and iOS only. It’s a natural conclusion, as Swift is closely tied to Apple’s own Xcode development environment. But one part of the Swift story is often overlooked: Swift is a cross-platform programming language, with support for Linux, Android, and Windows.
Much of the confusion comes from Apple’s providing UI tooling only for its own platforms. For other platforms, Swift is intended to be a portable systems programming language, allowing you to bring business logic from mobile and desktop devices to the cloud, adding APIs for web front ends. If you want a UI, you’ll need a web browser, as there are a number of web frameworks for Swift, mainly targeting the Linux release.