We have been hard at work to bring the Swift toolchain to FreeBSD. A preview Swift bundle for FreeBSD 14.3+ is available at https://download.swift.org/tmp-ci-nightly/development/freebsd-14_ci_latest.tar.gz. The bundle contains a Swift development compiler and Swift runtimes needed for compiling Swift programs on, and for, FreeBSD 14 on x86_64 machines.
Dependencies
The Swift compiler and runtimes have a few dependencies. Please install the following dependencies:
zlib-ng
python3
sqlite3
libuuid
curl
Known Issues
The compiler in the bundle is still under development and isn't part of a release yet and we're not quite done porting everything to FreeBSD.
Here is a list of known issues that you may run into while trying things out.
On FreeBSD 15, the following error occurs when executing swift .
Yes, the FreeBSD stability policy appears to be within a major version. The bundle is built for FreeBSD 14. I'm glad to see that you were able to find a workaround though.
For -STABLE branches, it's important to make sure that ABI is compatible across dot releases (in other words, user can expect applications that is compiled for X.0 would run without modification on any X.y releases). We also try to maintain ABI compatibility across .0 releases, but they are not strictly enforced except for libraries that already implements versioned symbols.
Generally speaking, I would expect the Swift compatibility policy for FreeBSD to be similar to that of Linux. We distribute toolchains for e.g. Ubuntu 22 and Ubuntu 24 that are distinct. @etcwilde that sounds right, I hope?
It seems the current preview toolchain does not include standard libraries for Embedded Swift. Do you plan to support Embedded Swift on FreeBSD in the future?