3 ms·
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. Eve
by jimbobthrowawy 2y ago
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.
- robertjpayne 2y agoYou 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.
- BodkinsOdds 2y agoThere's a couple: https://github.com/stackotter/swift-cross-ui https://github.com/stackotter/swift-cross-ui (Linux + Windows) https://github.com/TokamakUI/Tokamak 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.