2025-06-25 swift (re)lands in the FreeBSD ports tree
Swift has landed (again) in the FreeBSD ports tree (link)! This is pretty exciting (if you like programming tools) as there has been multiple efforts to bring Swift to FreeBSD over the years. Unlike some other of the newer programming ecosystems that have taken FreeBSD (as well as NetBSD and OpenBSD) off their roadmaps the Swift project has never explicitly taken the BSDs off of their roadmap.
Note that this is not the first time that swift has made it into the ports tree. Earlier versions of swift (last was swift 3) had made it into the ports tree but unfortunately as the swift language has progressed, the ongoing tending for FreeBSD support ended up falling behind. However, with the recent announcements in this year's WWDC event mentioning future FreeBSD support, it is good to see Swift making progress as a viable programming environment for FreeBSD. The current version in the ports tree is for Swift 5.10 which I think is a good placeholder until the FreeBSD supported version comes out (which sounds like it will be in Swift 6.2). There aren't any packages available however if you are ready to go the ports route the following should be able to build if you have a ports tree available (make sure the tree has been updated to a recent checkout).
cd /usr/ports/lang/swift510
make && doas make install
Note that the ports installation will put the installation in the path /usr/local/swift510 so you will need to update your $PATH to something like below if you want to use the swift tooling.
export PATH=$PATH:/usr/local/swift510/bin
Once you do you should be able to get something like the following (I have already built the port and have been kicking the tires):
swift --version
Swift version 5.10.1 (swift-5.10.1-RELEASE)
Target: x86_64-unknown-freebsd14.3
Some further reading (if you like looking through issue reports). Enjoy!