Bringing Goodnotes to the web with Swift and WebAssembly
Yuta Saito · 2026年6月1日
AI 摘要 AI 生成,可能有误
Goodnotes 通过 SwiftWasm 将其现有的 Swift 代码库编译为 WebAssembly,从而将其 iPad 笔记应用带到了网页端,避免了代价高昂的重写,同时确保各平台间的墨迹渲染和行为完全一致,该网页应用的 220 万行代码中有 66% 与 iOS 共享。关键技术成果包括基于 WASI Threads 和 SharedArrayBuffer 的多线程(带来了超过 2 倍的 INP 提升)、用于 JavaScript 互操作的 JavaScriptKit,以及配备 Chrome DevTools 调试的成熟开发工作流程。经过两年的开发以及超过两年的生产环境运行,团队已将所有与 WebAssembly 相关的变更贡献至上游,并且自 Swift 6.2 起官方支持该平台,这证明了 Swift 是构建复杂且性能关键型 Web 应用的可行之选。
Goodnotes has been helping millions of users take handwritten notes on iPad for over a decade, earning recognition as Apple’s iPad App of the Year in 2022. Today, the same Swift code that powers our iOS app also runs seamlessly in web browsers through WebAssembly, delivering the exact same ink rendering and note-taking experience users love.
This journey demonstrates that Swift excels as a cross-platform language, running high-performance applications while sharing the same codebase. Every bug fix and improvement to Goodnotes benefits all our users simultaneously, regardless of which platform they use.
After two years of development and over two years in production at Goodnotes, we’ve shown that Swift on WebAssembly is a viable, powerful approach for building complex, performance-critical web applications.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要The November 2026 edition of "What's new in Swift" features a guest contribution from Dave Verwer announcing that CocoaPods will stop accepting new pods and pod versions on December 2, 2026, urging developers still using it to migrate to Swift Package Manager while noting existing pods will remain available in read-only form. The digest also rounds up community content, including talks on migrating C++ to Swift, building Android apps with Swift, and creating Minecraft mods, along with new package releases such as Swift Kafka Client 1.0.0, swift-ros2, and Perfect-NIO. It concludes with an overview of Swift Evolution proposals under active review or recently accepted, covering features like Unicode bidirectional class lookup, build configuration conditionals for dependencies, task identity, and SwiftPM compilation caching.
AI 摘要The Swift project participated in Google Summer of Code 2026, running three successfully completed projects pairing newcomers with mentors. The projects added DocC language features to SourceKit-LSP (such as go-to-definition and syntax highlighting for documentation), a high-performance task registry for tracking Swift Concurrency tasks to aid debugging, and qualified name lookup support in swift-syntax for tool developers. The article concludes by thanking the contributors and mentors, and directs readers to previous years' projects and future participation opportunities.
AI 摘要This September 2026 edition of 'What's new in Swift' celebrates the Vapor web framework's tenth anniversary with the first beta of Vapor 5, a complete rewrite adding full structured concurrency and dropping EventLoopFutures, and covers the release of Swift 6.4 with Swift Build as the new SwiftPM default, Subprocess 1.0, and up to 40x faster WebAssembly bridging. Community highlights include Google's official Cloud client libraries for Swift, a Swift-written kernel demo, Solbach Leads' migration of a production AI pipeline from Kotlin to Swift and Vapor, and new releases like WasmKit 0.4 and Swift AWS Lambda Runtime 3.0. The digest also rounds up Swift Evolution activity, including the under-review SE-0554 deployment target conditional compilation and recently accepted proposals such as SE-0546 same-file memberwise initializer extensions and SE-0540 default target settings.
AI 摘要Swift 6.4 is now available, with highlights including Swift Build as the default build system in Swift Package Manager, the Subprocess library reaching 1.0, and deeper interoperability with C++, Java, WebAssembly, and Android. The release simplifies everyday coding through features like optional some/any types without parentheses, the @diagnose attribute for controlling compiler warnings, and module selectors for resolving name conflicts, while performance work introduces non-copyable element arrays without copy-on-write overhead and the new Iterable protocol. Additional improvements span faster WebAssembly bridging (up to 40x), more robust debugging with precise module tracking, broader IDE support, and Embedded Swift gaining existential types and richer error handling for microcontroller targets.
AI 摘要Changes begun in Swift 6.3 and completing in Swift 6.4 improve how the Swift compiler tracks explicitly-built Swift modules in debug info, letting LLDB's expression evaluator find and import the exact module and its dependencies instead of relying on imprecise by-name lookups and special linker steps. This makes debugging faster and more reliable while dramatically shrinking binaries and dSYM bundles, which will no longer embed binary Swift modules. Developers using SwiftPM or Xcode benefit automatically, while those maintaining custom build systems can drop the now-deprecated -modulewrap actions and -add_ast_path linker options.