News for hackers. Stuff that matters.
Re:Swift Static Linux SDK by jimbobthrowawy on Tuesday June 11, 2024 @07:40PM (#40652938)
Has nobody made a polyfill for swiftUI on other platforms yet? Or is it too tied to apple OS-level APIs? The language itself is pretty nice, last I used it. Even if some of the method (argument?) names in most SDKs are absurdly long.
Re:Swift Static Linux SDK by robertjpayne on Wednesday June 12, 2024 @06:42PM (#40663997)
You can implement the same syntax for a renderer on other platforms but all of SwiftUI is closed source. So the diffing engine etc… all would need to be re-created from the ground up.

SwiftUI, like react uses some language constructs to make it look really fancy but in reality it's really simple nested data structs.

The real hard part is what the "DOM" provides for React and likewise what UIKit/iOS is doing with those data structs.

Re:Swift Static Linux SDK by BodkinsOdds on Sunday June 23, 2024 @08:07AM (#40766825)
There's a couple:

https://github.com/stackotter/swift-cross-ui (Linux + Windows)

https://github.com/TokamakUI/Tokamak (WASM + MacOS + some Ubuntu support)

They both had to rewrite the entire backend from scratch, because SwiftUI is very, very closed source. But Tokamak does have an import that just forwards to SwiftUI on Apple platforms.