We are excited to announce the 0.1.0 release of swiftly, a new Swift toolchain manager developed by the SSWG!
swiftly is a CLI tool for installing, managing, and switching between Swift toolchains, written in Swift. swiftly is designed to be extremely easy to install and get running (installation is usually just a bash one-liner), and its command interface is intended to be flexible while also being simple to use.
swiftly currently supports the following features:
- Installing Swift toolchains, either releases or snapshots
- toolchains can be installed by name, or portions of the name can be left out and swiftly will fetch the most recently produced matching toolchain
- Switching which installed toolchain is active (i.e. which one is discovered via
- Uninstalling toolchain(s)
- Listing installed toolchains
In the future, swiftly will supporting updating installed toolchains and listing toolchains that are available for install.
Right now, swiftly only supports Linux, but the medium term plan is to also support macOS and in long term to support all platforms that Swift runs on.
For more information about swiftly, check out the README.
As mentioned before, swiftly's installation is designed to be extremely fast and easy. In fact, pasting the following one-liner into your shell is all you need to get started:
curl -L https://swift-server.github.io/swiftly/swiftly-install.sh | bash
The installation script will first display a prompt allowing you to customize the installation (the defaults should be fine for most users), and then it will proceed with downloading the swiftly binary and installing it. As part of this, any system dependencies required by Swift itself will also be installed via the system's package manager (this is enabled by default but can optionally be disabled).
The landing page at swiftly - A Swift toolchain installer and manager, written in Swift also contains these instructions in case you need them in the future or want to share them with a friend.
$ swiftly install latest Fetching the latest stable Swift release... Installing Swift 5.8.1 Downloaded 488.5 MiB of 488.5 MiB Extracting toolchain... Swift 5.8.1 installed successfully! $ swift --version Swift version 5.8.1 (swift-5.8.1-RELEASE) Target: x86_64-unknown-linux-gnu
While this does mark the first public release of swiftly, it is still in early development, so any feedback, feature requests, and bug reports would be greatly appreciated! To do so, please file an issue on swiftly's GitHub repository, or just respond with your initial thoughts in this thread. Thanks in advance!
Swift.org currently provides experimental
.deb packages that allow you to install Swift via your package manager. While these are an effective way to install and update a single version of Swift, they aren't well suited to the task of installing multiple Swift toolchains that you can easily switch between. swiftly's target audience are Swift developers that switch between versions for the purposes of testing their libraries and applications. The
.rpm also currently don't provide support for snapshot toolchains.
How is this different from swiftenv?
swiftenv is an existing Swift version manager which already has much of the functionality that swiftly will eventually have. It's an awesome tool, and if it's part of your workflow then we encourage you to keep using it! That said, swiftly is/will be different a few ways:
swiftly is being built as a community driven effort led by the Swift Server Workgroup, and through this collaboration, swiftly may eventually become an official installation tool for Swift toolchains and use new swift.org APIs for fetching releases and snapshots (note: this is planned for the future, swiftly currently uses GitHub APIs for this).
swiftly will be written in Swift, which we think is important for maintainability and encouraging community contributions.
swiftly is optimized for ease of installation--it can be done with a bash one-liner similar to Homebrew and rustup.
swiftly has first-class support for installing and managing snapshot toolchains.