Re: A modern programming language for FreeBSD: Swift

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sun, 15 Jun 2025 15:04:53 UTC
Jordan Gordeev <jgopensource_at_proton.me> wrote on
Date: Sun, 15 Jun 2025 10:59:17 UTC :

> On Saturday, 14 June 2025 at 17:06, Konstantin Belousov <kostikbel@gmail.com> wrote:
> 
> > On Sat, Jun 14, 2025 at 01:06:40PM +0000, Jordan Gordeev wrote:
> > 
> > > * support for dynamic linking (incl. to libc for isolating generated code from changes to the userland–kernel interface)
> > 
> > 
> > What specifically do you mean there?
> > 
> > Does swift run over the C runtime, or like Go, it implements its own
> > runtime directly interacting with kernel syscalls?
> 
> Swift programs rely on libc for their system calls. The Swift program calls a function in libc and libc does the call into the kernel.

As they have not published what they are providing for FreeBSD yet,
I'll use Linux information to indicate possibilities. Some might
end up not existing for FreeBSD for all I know.

Swift has multiple implementations for Linux for providing ways to
build Swift programs. From what I can tell, all but one of them are
as indicated above, some indirectly (Docker and WebAssembly):

As indicated when built by what is installed via:

Swiftly installer
Container Docker Hub
Swift SDK for WebAssembly
Tarball

(As far as I could tell, it seemed that all 4 could be independently
installed and used instead of any being alternate ways of installing
the same thing.)

Not as indicated when built by what is installed via:

Static Linux SDK - Cross compile to Linux (just sys calls accessed)

I do not know if there will be a "Static FreeBSD SDK" but it would
seem to be a possibility.

===
Mark Millard
marklmi at yahoo.com