A SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms.
Tokamak is a SwiftUI-compatible framework that allows developers to build browser applications using WebAssembly and native apps for other platforms. It provides a declarative UI approach similar to SwiftUI, enabling cross-platform development with a shared Swift codebase. The framework aims to bring SwiftUI's development experience to the web and expand the reach of Swift applications beyond Apple ecosystems.
Swift developers familiar with SwiftUI who want to build web applications using WebAssembly or target multiple platforms with a single codebase. It is also suitable for those interested in cross-platform UI development with Swift.
Developers choose Tokamak because it allows them to use Swift and SwiftUI paradigms for web development, leveraging WebAssembly for performance and compatibility. Its compatibility with existing SwiftUI code and multi-platform support provides a unique advantage for teams already invested in the Swift ecosystem.
[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.
Developers can use declarative syntax identical to SwiftUI, as shown in the example code where `import TokamakShim` replaces `import SwiftUI` for cross-platform builds.
Compiles Swift code to WebAssembly for efficient browser execution, enabling high-performance web apps with Swift, as highlighted in the WebAssembly target feature.
Allows building apps for WebAssembly/WASI and native Apple platforms from the same codebase, reducing duplication and leveraging Swift's cross-platform capabilities.
Provides `HTML` and `DynamicHTML` views for arbitrary HTML and SVG with event handling, useful for web-specific integrations beyond standard SwiftUI components.
The README explicitly states it implements only a 'very basic subset' of SwiftUI, with missing views and modifiers, limiting out-of-the-box functionality.
Relies on `carton` for building and requires specific Xcode or Swift versions, adding setup overhead compared to standard web development workflows.
Older browsers need manual build flags (e.g., `JAVASCRIPTKIT_WITHOUT_WEAKREFS`), complicating deployment for wider audience support without extra configuration.