[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6892":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":15,"starSnapshotCount":15,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},6892,"SwiftWebUI","SwiftWebUI\u002FSwiftWebUI","A demo implementation of SwiftUI for the Web","http:\u002F\u002Fwww.alwaysrightinstitute.com\u002Fswiftwebui\u002F",null,"Swift",4276,160,89,36,0,1,3,59.42,"Apache License 2.0",false,"develop",[23,24,25,26,27],"swift-library","swift5","swiftui","swiftui-example","swiftwebui","2026-06-12 04:00:30","\u003Ch2>SwiftWebUI\n  \u003Cimg src=\"https:\u002F\u002Fzeezide.com\u002Fimg\u002FTinkerIcon.svg\"\n       align=\"right\" width=\"128\" height=\"128\" \u002F>\n\u003C\u002Fh2>\n\n![Swift5.1](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fswift-5.1-blue.svg)\n![macOS](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fos-macOS-green.svg?style=flat)\n![tuxOS](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fos-tuxOS-green.svg?style=flat)\n![Travis](https:\u002F\u002Fapi.travis-ci.org\u002FSwiftWebUI\u002FSwiftWebUI.svg?branch=develop&style=flat)\n\nMore details can be found on the related blog post at the\n[Always Right Institute](http:\u002F\u002Fwww.alwaysrightinstitute.com).\n\nAt\n[WWDC 2019](https:\u002F\u002Fdeveloper.apple.com\u002Fwwdc19\u002F)\nApple announced \n[SwiftUI](https:\u002F\u002Fdeveloper.apple.com\u002Fxcode\u002Fswiftui\u002F).\nA single \"cross platform\", \"declarative\" framework used to build \ntvOS, macOS, watchOS and iOS\nUIs.\n[SwiftWebUI](https:\u002F\u002Fgithub.com\u002FSwiftWebUI\u002FSwiftWebUI)\nis bringing that to the Web ✔️\n\n**Disclaimer**: This is a toy project!\nDo not use for production. \nUse it to learn more about SwiftUI and its inner workings.\n\n## SwiftWebUI\n\nSo what exactly is \nSwiftWebUI?\nIt allows you to write SwiftUI \n[Views](https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Fswiftui\u002Fview)\nwhich display in a web browser:\n\n```swift\nimport SwiftWebUI\n\nstruct MainPage: View {\n  @State var counter = 0\n  \n  func countUp() { \n    counter += 1 \n  }\n  \n  var body: some View {\n    VStack {\n      Text(\"🥑🍞 #\\(counter)\")\n        .padding(.all)\n        .background(.green, cornerRadius: 12)\n        .foregroundColor(.white)\n        .onTapGesture(self.countUp)\n    }\n  }\n}\n```\n\nResults in:\n\n\u003Ccenter>\u003Cimg src=\"https:\u002F\u002Fzeezide.com\u002Fimg\u002FAvocadoCounter.gif\" align=\"center\" \u002F>\u003C\u002Fcenter>\n\nUnlike some other efforts this doesn't just render SwiftUI Views\nas HTML. \nIt also sets up a connection between the browser and the code hosted\nin the Swift server, allowing for interaction - \nbuttons, pickers, steppers, lists, navigation, you get it all!\n\nIn other words: \n[SwiftWebUI](https:\u002F\u002Fgithub.com\u002FSwiftWebUI\u002FSwiftWebUI)\nis an implementation of (many but not all parts of) the SwiftUI API for the browser.\n\nTo repeat the\n**Disclaimer**: This is a toy project!\nDo not use for production. \nUse it to learn more about SwiftUI and its inner workings.\n\n\n## Requirements\n\nOn a Mac macOS 10.15 or later is required.\n\n### tuxOS\n\nSwiftWebUI now runs on Linux using\n[OpenCombine](https:\u002F\u002Fgithub.com\u002Fbroadwaylamb\u002FOpenCombine) (also works without\nthat, but then some things don't work, e.g. `NavigationView`).\n\nSwift 5.2 or later is required.\nWe also provide a Docker image containing a 5.1 snapshot over here:\n[helje5\u002Fswift](https:\u002F\u002Fcloud.docker.com\u002Frepository\u002Fdocker\u002Fhelje5\u002Fswift\u002Ftags).\n\n\n## SwiftWebUI Hello World\n\nTo setup a SwiftWebUI project,\ncreate a \"macOS tool project\" in Xcode 11,\nthen use the new SwiftPM integration and add\n`https:\u002F\u002Fgithub.com\u002FSwiftWebUI\u002FSwiftWebUI`\nas a dependency.\n\nOpen the `main.swift` file and replace it's content\nwith:\n```swift\nimport SwiftWebUI\n\nSwiftWebUI.serve(Text(\"Holy Cow!\"))\n```\n\nCompile and run the app in Xcode, open Safari and hit\n[`http:\u002F\u002Flocalhost:1337\u002F`](http:\u002F\u002Flocalhost:1337\u002F):\n\n\u003Ccenter>\u003Cimg src=\"https:\u002F\u002Fzeezide.com\u002Fimg\u002Fholycow.png\" align=\"center\" width=\"538\" \u002F>\u003C\u002Fcenter>\n  \n\n## 🥑🍞 AvocadoToast\n\nA small SwiftWebUI sample  based on the \n[SwiftUI Essentials](https:\u002F\u002Fdeveloper.apple.com\u002Fvideos\u002Fplay\u002Fwwdc2019\u002F216)\n\"Avocado Toast App\".\nFind it over here:\n[AvocadoToast](https:\u002F\u002Fgithub.com\u002FSwiftWebUI\u002FAvocadoToast).\n\n\u003Ccenter>\u003Cimg src=\"http:\u002F\u002Fzeezide.com\u002Fimg\u002FAvocadoToast.gif\" align=\"center\" width=\"538\" \u002F>\u003C\u002Fcenter>\n\n\n## Who\n\nBrought to you by\n[Helge Heß](https:\u002F\u002Fgithub.com\u002Fhelje5\u002F) \u002F [ZeeZide](https:\u002F\u002Fzeezide.de).\nWe like feedback, GitHub stars, cool contract work, \npresumably any form of praise you can think of.\n","SwiftWebUI 是一个将 SwiftUI 框架应用于 Web 端的演示实现。它允许开发者使用 SwiftUI 语法编写可在浏览器中显示的视图，并通过在 Swift 服务器与浏览器之间建立连接来支持交互功能，如按钮点击、选择器等。该项目利用了 Swift 的声明式编程特性，使得界面开发更加直观简洁。尽管目前仍处于实验阶段并不适合生产环境部署，但非常适合用于学习和探索 SwiftUI 的工作机制及其如何跨平台应用。支持 macOS 及 Linux（部分功能受限），需要 Swift 5.1 或更高版本。",2,"2026-06-11 03:09:25","top_language"]