A SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms.
Tokamak is a SwiftUI-compatible framework that enables developers to build web applications using Swift, compiling to WebAssembly for browser execution. It allows Swift developers to leverage their existing SwiftUI knowledge to create interactive web apps, bridging the gap between native Apple development and the web. The framework provides a declarative UI approach similar to SwiftUI, with support for custom HTML rendering and JavaScript interoperability.
Swift developers who want to build web applications without leaving the Swift ecosystem, and teams looking to share UI code between web and native platforms using a SwiftUI-like API.
Tokamak offers a unique value by allowing Swift developers to use SwiftUI's declarative syntax for web development, reducing the learning curve and enabling code sharing across platforms. Its compatibility with SwiftUI and focus on WebAssembly make it a compelling choice for expanding Swift's reach beyond Apple's native platforms.
[Looking for active maintainers] SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Lets Swift developers use declarative UI code they already know, with the README noting that 'Tokamak API attempts to resemble SwiftUI API as much as possible,' reducing the learning curve for web development.
Compiles Swift to WebAssembly for browser execution, expanding Swift beyond Apple platforms, as highlighted in the key features for targeting modern web browsers.
Provides HTML and DynamicHTML views for custom elements and event handling, allowing direct DOM interaction when needed, with examples in the README for arbitrary HTML and SVG.
Fiber renderer offers faster updates and better layout accuracy, modeled after React's reconciler, as an optional feature that can improve larger view hierarchies.
Implements only a 'very basic subset of SwiftUI,' with many APIs missing, requiring developers to check a progress document or create workarounds, limiting out-of-the-box functionality.
Requires specific versions of Swift, Xcode, and the carton build tool, with setup steps that can be cumbersome, especially on Linux or for CI/CD pipelines, as detailed in the requirements section.
Limited to modern browsers by default, and supporting older versions requires additional compiler flags like JAVASCRIPTKIT_WITHOUT_WEAKREFS, increasing maintenance and testing overhead.