←back to thread

612 points dayanruben | 1 comments | | HN request time: 0s | source
Show context
sgt ◴[] No.42899856[source]
Is Swift actually serious about embedded?
replies(6): >>42899910 #>>42899953 #>>42900093 #>>42900473 #>>42901728 #>>42905236 #
timsneath ◴[] No.42899910[source]
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.)

replies(5): >>42900254 #>>42900260 #>>42900653 #>>42901449 #>>42901605 #
sgt ◴[] No.42900260[source]
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?
replies(3): >>42900529 #>>42900551 #>>42900720 #
pjmlp ◴[] No.42900529[source]
Why should it not, one of the design goals of Swift as C, Objective-C and C++ replacement was painless interop with those languages.

Thus it is more an issue of Swift embedded toolchain being able to be used alongside FreeRTOS on the specific hardware target.

replies(1): >>42902182 #
1. josteink ◴[] No.42902182[source]
> Why should it not, one of the design goals of Swift as C, Objective-C and C++ replacement was painless interop with those languages.

This is actually a very good quality. I'm exploiting that for all it's worth in a job project where I'm gradually (file by file) converting a legacy codebase from Objective-C to Swift.

Providing an exit-strategy for Objective-C is good enough reason for me to at least have a basic working knowledge of the language.