If they'd drastically improved their tooling then yes.
But sadly it's not that easy to create a statically liked binary in swift. The last time i did it it also included the whole runtime, and the resulting "hello world" binary was 50mb large. Annoying at least.
For years I wished they got their stuff together, but at this point I'd be very suprised. They probably have too much technical dept already due to the support of XXX edge cases Apple need for iOS/MacOS development.
In this thread on Swift for AWS Lambda, a dev gets a Linux static build to 5.9 megabytes:
"Then, I stripped it and it's now 5.9Mb. That's an impressive 86% reduction.
Given that musl libc.a is 2.4Mb and libc++.a is 10Mb, I find that 5.9Mb for an executable that contains both libc and the Swift runtime is not that bad :-)"
Good that they work on it. And the efforts to refactor foundation into smaller modules go in the same direction.
I continue to root for them but they need so many improvments to be a realistic alternative to python/typescript/go/java for regular backend development.
At least in my field where we need to sure that other developers can continue the development without much hassle.
Just as an example, with those languages it's almost trivial to setup a basic projekt with dependencies. In swift however, it takes careful reading ot the swift package manager documentation to understand their concept of "products", "targets", etc.
And I'm pretty sure i'd have to start from zero when i use swift for the advent of code in a few days.
There are many problems with devepdencies in Python, or package.json/gradle files. But at least they are (almost) foolproof to get started.
But sadly it's not that easy to create a statically liked binary in swift. The last time i did it it also included the whole runtime, and the resulting "hello world" binary was 50mb large. Annoying at least.
For years I wished they got their stuff together, but at this point I'd be very suprised. They probably have too much technical dept already due to the support of XXX edge cases Apple need for iOS/MacOS development.