# Bringing Goodnotes to the web with Swift and WebAssembly

DevFeed: [Bringing Goodnotes to the web with Swift and WebAssembly](<https://devfeed.tech/articles/bringing-goodnotes-to-the-web-with-swift-and-webassembly-2927.md>)

Original publisher: [Read original article](<https://swift.org/blog/bringing-goodnotes-to-web-with-swift/>)

Author: Yuta Saito

Published: 2026-06-01T12:00:00Z

Content type: article

Language: en

Sources: [Swift.org](<https://devfeed.tech/sources/swift-org.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Web](<https://devfeed.tech/topics/web.md>), [Web app](<https://devfeed.tech/topics/webapp.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>), [crdt](<https://devfeed.tech/topics/crdt.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [conflict-resolution](<https://devfeed.tech/tags/conflict-resolution.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [flutter](<https://devfeed.tech/tags/flutter.md>), [fps](<https://devfeed.tech/tags/fps.md>), [handwriting](<https://devfeed.tech/tags/handwriting.md>), [high-performance](<https://devfeed.tech/tags/high-performance.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [ink](<https://devfeed.tech/tags/ink.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ipad](<https://devfeed.tech/tags/ipad.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [performance](<https://devfeed.tech/tags/performance.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [swift](<https://devfeed.tech/tags/swift.md>), [web](<https://devfeed.tech/tags/web.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

## AI overview

Goodnotes runs much of its existing Swift code in browsers through WebAssembly, preserving the same ink behavior across iOS and web while avoiding a rewrite of its performance critical rendering engine. The web app shares 1.47 million lines of Swift, including rendering logic, business logic, and view models; Metal and WebGL provide platform specific graphics layers. The team adapted code for WebAssembly's 32 bit Int and lack of libdispatch, using Swift Concurrency and dependency injection for shared logic and platform specific I/O. WASI Threads, Web Workers, SharedArrayBuffer, and custom actor executors move recognition and indexing off the main thread; Goodnotes reports over 60 FPS rendering and more than 2x improvement in Interaction to Next Paint. Multithreading requires browser Cross-Origin Isolation; single threaded cooperative concurrency is an option when that requirement cannot be met. The binary is about 50 MB, or 12 MB with Brotli, with Service Workers used for caching. The team recommends validating with a performance critical component, building platform abstractions early, and adopting gradually.

## Source excerpt

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. Why we chose Swift for the web When we decided to bring Goodnotes to the web in 2021, we faced a critical decision. After more than 10 years of development, we had accumulated millions of lines of Swift code that implemented countless refinements and optimizations for digital ink rendering, document synchronization, conflict resolution using Conflict-Free Replicated Data Types (CRDTs), and content search and document indexing. We need to maintain more than 60 Frames Per Second (FPS) for real-time ink rendering, which makes performance critical. A JavaScript rewrite, Flutter, or Kotlin Multiplatform would all require rewriting our entire rendering engine from scratch, a substantial undertaking that would have delayed our web launch by years and inevitably introduced behavioral differences between platforms. SwiftWasm emerged as the solution. This community-driven project allows Swift code to compile to WebAssembly, running in browsers with good performance. We started experimenting with SwiftWasm, building prototypes to validate the approach. Our first experiment focused on our handwriting component, a performance-critical part of Goodnotes that would serve as a go