What does HackerNews think of Tokamak?

SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms

Language: Swift

#125 in Hacktoberfest
#8 in Swift
I’ve been seriously impressed with Tokamak for Swift. Is this what you mean for browser native GUI?

https://github.com/TokamakUI/Tokamak

I wonder how far you could get using something like https://github.com/carson-katri/SwiftWebUI or https://github.com/TokamakUI/Tokamak to render the Swift app to a webview for the other platforms... I’ve not tried it, I imagine there might be jank and limitations as SwiftWebUI is “a toy project” but with some work could be a legit option - I’ve run pretty bespoke and complex React Native applications as desktop apps via react-native-web and Electron and it worked incredibly well.

I do like the idea of only maintaining a single codebase, but of course it comes with significant trade offs. The idea of building for Apple-first but automatically getting a reasonable fallback for other platforms is quite appealing - as you say, for many businesses it probably makes sense to focus on having the most polished iOS experience possible.

Honestly I’ve been quite impressed with the end results we’ve got from React Native, but you are always going to be lagging behind the native platform.

I'm excited about a few projects bringing Swift to other platforms. SwiftWasm is surprisingly painless to get working [1]. Tokamak is an early stage SwiftUI-compatible framework for building web apps [2]. It also has the goal of supporting other native platforms and to that end there is early work on a GTK backend. I have no affiliation with these projects, though I would like to contribute to them at some point.

[1] https://swiftwasm.org/

[2] https://github.com/TokamakUI/Tokamak