How to obtain a Swift Compiler without Xcode?

Problem: Xcode is monolithically huge and 75% of the roughly 40 GB installed is stuff I don't have any use for (SDKs and simulators for every. single. Apple. platform. under. the. sun: iOS, padOS, appleTVOS, watchOS, and eventually glassesOS and carOS.. though, by then, it'll probably be 80 GB)… My laptop has nothing installed (and no documents) and yet it is still incapable of installing the latest versions of Xcode.

  • Removing those extra deadweights from the application bundle (under /Contents/Developer/Platforms/) renders the application "corrupted" since the application is signed.
  • Any attempt at obtaining swiftc requires Xcode:

Honestly, I'm surprised that even the open-source community has essentially surrendered everything to the ever-inflating-and-mighty-and-never-wrong Xcode.

Question: Is there any secure way of obtaining the swift compiler on macOS without, Apple forbids, having Xcode?!

You need xcode to do any apple development. If you didn't need xcode, you wouldn't need a mac and apple wouldn't want that.

You can download a package of just the command line tools. This package is also available for installation in Terminal through the xcode-select --install command even if Xcode is not installed.

How to obtain a Swift Compiler without Xcode?
 
 
Q