Building Swift and the Swift toolchain from source
There are a number of sites that show you how to build Swift from source, but unfortunately most of these sites give directions for building just the Swift language itself without the toolchain. I find that not very useful, unless you are only writing very simple applications. In my opinion, building Swift for Linux without the entire toolchain and the package manager is more of an exercise of "Can I do it" rather than building something you can use long term.
While using the latest build of Swift is not recommended for production systems, it does enable us to use the latest features of the language and also verify that changes introduced in our application are compatible with future versions of the Swift language.
In this chapter, we will look at how we can build Swift, its entire toolchain, and the Swift package manager from source. Since each flavor of Linux and macOS are somewhat different, I need...