Running swift-language builds and doing swift development is possible on linux. To install swift use sourcekit-lsp is available, e.g. as plugin to visual studio code, .AUR for the released version, repackaged Fedora binary, or AUR for a native build from source. AUR will give the latest from git. For code completion the sourcekit language server protocol,
swift package manager allows to create example programs.
swift package init --type executable swift run
swift package init swift build
edit and code completion
Install, then install sourcekit-lsp from source, is needed.
install vscode sourcekit-lsp from source
git clone firstname.lastname@example.org:apple/sourcekit-lsp.git cd Editors/vscode npm run createDevPackage code --install-extension out/sourcekit-lsp-vscode-dev.vsix
read eval print loop, REPL
For details on the swift REPL, see here.
read eval print loop
> swift Welcome to Swift version 5.3 (swift-5.3-RELEASE). Type :help for assistance. 1> 1+1 $R0: Int = 2 2>