▲ | Terretta a day ago | |
> For years I wished they got their stuff together, but at this point I'd be very suprised. This is a thing that's having work done, but still too large depending: https://www.swift.org/documentation/articles/static-linux-ge... See here for sizes of various languages as of August 2024 when I'm commenting, but this is Swift 5.10 for Windows: https://github.com/MichalStrehovsky/sizegame Build actions here: https://github.com/MichalStrehovsky/sizegame/blob/master/.gi... What you want, instead, is Swift 6 for Linux, while e.g. Alpine, as of summer, still too large: https://mko.re/blog/swift-alpine-packaging/#:~:text=Package%.... 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 :-)" https://forums.swift.org/t/aws-lambda-functions-and-the-linu... > They probably have too much technical dept already due to the support of XXX edge cases Apple need for iOS/MacOS development. See also embedded Swift: "Apple explains that Embedded Swift is a subset of the Swift programming language with a much smaller footprint (the binary can be around 10KB..." https://www.cnx-software.com/2024/06/13/embedded-swift-esp32... | ||
▲ | zapnuk a day ago | parent [-] | |
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. |