Live data from Hacker News

Apple is open sourcing Swift Build

swift.org

31–40 of 300 posts

Re: Apple is open sourcing Swift Build

#31
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.)

Thanks for that link to the examples repo. I had just started looking into embedded Swift for an rp2350 project a couple days ago, but (being a novice in embedded hardware/microcontrollers) I got the impression from the Swift website that the device wasn't supported yet and I'd need an rp2040 instead. It looks like there's an example project for the rp2350 in that repo though, so I'm going to be playing with this tonight!

Re: Apple is open sourcing Swift Build

#32
post #18
post #8

Earlier quoted context omitted.

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.

SwiftPM has always supported building GUI apps.

Re: Apple is open sourcing Swift Build

#33
post #21

Earlier quoted context omitted.

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.)

Swift is unbelievably cool but I wonder about using Swift for an embedded project as opposed to just C or with FreeRTOS for a more capable system. Is interoperability possible - as in FreeRTOS+swift?

If you look at the blinking LED sample, it's pulling in the freertos header:

  #include "freertos/FreeRTOS.h"
So presumably yes?

Re: Apple is open sourcing Swift Build

#35
post #12

> a foundational step in this new chapter of Swift build technologies The corporate language throughout that post is pretty cringe. It seems so unnecessary.

Doesn’t seem corporate at all:

Foundation: a first important step Chapter: the next stage of Swift technologies: it is a technology

Re: Apple is open sourcing Swift Build

#36
I believe that this long game of Swift being "good for everything" but "better for Apple platforms" will be detrimental to the language. This does not help the language nor seems to bring more people to the ecosystem.

Competitors seems to have a combination of: - Being more open-source - Have more contributors - Have a narrower scope

Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the gap will only grow over time when compared to other languages.

Re: Apple is open sourcing Swift Build

#37

I wish they would stop adding anything to the language and document what they have. I constantly need to reverse engineer how things work. For example, I just had to integrate AccessorySetupKit and the docs are laughable.

AccessorySetupKit is an Apple framework, not part of swift

Re: Apple is open sourcing Swift Build

#38
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.

Go has been shipping for more than a decade as a .tgz and does not have this stigma at all ...

Anyway, you probably missed the following

https://www.swift.org/install/linux/

I see packages for all major distros there.

But people will probably mention some distro not listed and say the mainstream distro support is a farce. For some reason people have set the bar for Swift incredibly unrealistically high and there will always be something wrong it.

Your loss though. Swift is amazing. Both on MacOS and Linux.

Re: Apple is open sourcing Swift Build

#39
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...

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

What don’t you like about the VSCode plugin?

Re: Apple is open sourcing Swift Build

#40
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.)

Hi Tim. I liked your work with dart/flutter. Are you guys working on overhauling Xcode? The DX is atrocious.
Post reply on HN