Live data from Hacker News

Apple is open sourcing Swift Build

swift.org

11–20 of 300 posts

Re: Apple is open sourcing Swift Build

#11
post #2

Is Swift actually serious about embedded?

Although opinions inside Apple about Swift vary, they seem to be investing in low level Swift for embedded, kernel use, and programming the “Secure Enclave” subsystem.

They certainly have many opportunities to use it for headphones, AirTag, flash driver, etc, beyond the very believable but less embedded use in kernel/Secure Enclave.

See also the wwdc session where they propose swift for building smart home thingies https://youtu.be/LqxbsADqDI4?si=KTYWPLdjGgTwK1UB

Re: Apple is open sourcing Swift Build

#14
post #7
post #5

Earlier quoted context omitted.

Yes, there was an entire WWDC ‘24 talk about it… https://developer.apple.com/videos/play/wwdc2024/10197 Swift is a great language, but it is unfortunately still held back by the stigma of being perceived as only usable on Apple platforms.

And until packages are actually shipped for all mainstream distros, the stigma is completely accurate. No, neither "just install a tarball" nor "just install this docker image" count.

Distro packaging for programming language ecosystems is so often hopelessly out of date. I’ve never used a distro toolchain or packages to build production software for any language Python’s age or younger.

Outside of C/C++/Fortran pretty much every project I see on Github prefers things like Rustup or Nix for toolchains to navigate around Debian/Ubuntu/RHEL’s “stability” approach.

Re: Apple is open sourcing Swift Build

#15
post #7
post #5

Earlier quoted context omitted.

Yes, there was an entire WWDC ‘24 talk about it… https://developer.apple.com/videos/play/wwdc2024/10197 Swift is a great language, but it is unfortunately still held back by the stigma of being perceived as only usable on Apple platforms.

And until packages are actually shipped for all mainstream distros, the stigma is completely accurate. No, neither "just install a tarball" nor "just install this docker image" count.

I remember when all Linux projects used to be install a source tarball and do the configure, make config, make, make install dance.

That hasn't prevented Linux to take over most UNIX workloads.

Re: Apple is open sourcing Swift Build

#16
post #6
post #4

The goal for Swift should (and seems) to be to gradually separate itself from XCode, which is holding it back from its ambitions. XCode has been compared to many things, but at 3.1 stars on the App store, one must find that it is still slightly overrated.

Swift hasn’t required Xcode for several years now. It has robust command line tooling and a VSCode plugin. https://www.swift.org/documentation/articles/getting-started...

Despite being terrible, the last time I checked, the experience in Xcode was somehow still meaningfully better than with the VSCode plugin

Re: Apple is open sourcing Swift Build

#17
post #7

Earlier quoted context omitted.

And until packages are actually shipped for all mainstream distros, the stigma is completely accurate. No, neither "just install a tarball" nor "just install this docker image" count.

Working on it: https://github.com/swiftlang/swiftly?tab=readme-ov-file

Bringing synopsis here for those who may not click:

swiftly is a CLI tool for installing, managing, and switching between Swift toolchains, written in Swift. swiftly itself is designed to be extremely easy to install and get running, and its command interface is intended to be flexible while also being simple to use. The overall experience is inspired by and meant to feel reminiscent of the Rust toolchain manager rustup.

Re: Apple is open sourcing Swift Build

#18
post #8
post #6

Earlier quoted context omitted.

Swift hasn’t required Xcode for several years now. It has robust command line tooling and a VSCode plugin. https://www.swift.org/documentation/articles/getting-started...

I believe it still does at least for iOS, or it did last time I checked (for a Swift library I was writing).

Hence this announcement is great, since it seems to say they’re (going to?) support building GUI apps with SwiftPM and/or the newly open sourced build tool.

Re: Apple is open sourcing Swift Build

#19
post #8
post #6

Earlier quoted context omitted.

Swift hasn’t required Xcode for several years now. It has robust command line tooling and a VSCode plugin. https://www.swift.org/documentation/articles/getting-started...

I believe it still does at least for iOS, or it did last time I checked (for a Swift library I was writing).

Building Swift code for iOS without going through xcodebuild is sort of obnoxious but is possible. You do need to have a copy of Xcode installed regardless of programming language simply because the iOS SDKs aren't distributed separately.

Re: Apple is open sourcing Swift Build

#20
post #2

Is Swift actually serious about embedded?

Of course! Tons of examples here: https://github.com/apple/swift-embedded-examples At WWDC24, we shared a session on embedded Swift, which is available on YouTube: https://www.youtube.com/watch?v=LqxbsADqDI4 More documentation on embedded Swift tooling here: https://github.com/swiftlang/swift/blob/main/docs/EmbeddedSw... (Disclosure: I work at Apple.)

Wow! I’m really surprised by the ESP32 work here [1]. This looks super interesting! And, personally, unexpected.

This is the kind of thing that makes you want to quit your job and just tinker all day again.

[1] https://github.com/apple/swift-embedded-examples/blob/main/e...

Post reply on HN