swift

Create, run and build Swift projects. More information: <https://swift.org>.

Install

All systems
curl cmd.cat/swift.sh
Debian Debian
apt-get install swift
Ubuntu
apt-get install python2-swiftclient
Arch Arch Linux
pacman -S python2-swiftclient
image/svg+xml Kali Linux
apt-get install swift
Fedora
dnf install python2-swiftclient
Windows (WSL2)
sudo apt-get update sudo apt-get install python2-swiftclient
OS X
brew install swift
Raspbian
apt-get install python2-swiftclient

Create, run and build Swift projects. More information: <https://swift.org>.

  • Start a REPL (interactive shell):
    swift
  • Execute a program:
    swift file.swift
  • Start a new project with the package manager:
    swift package init
  • Generate an Xcode project file:
    swift package generate-xcodeproj
  • Update dependencies:
    swift package update
  • Compile project for release:
    swift build -c release

© tl;dr; authors and contributors