---
title: "Bringing Goodnotes to the web with Swift and WebAssembly"
description: "Goodnotes runs the same Swift code behind its iPad app in browsers by compiling it to WebAssembly with SwiftWasm, sharing 1.47M lines (66% of the 2.2M-line web codebase) including a rendering engine that targets Metal on iOS and WebGL on the web."
url: "https://swe.quest/articles/bringing-goodnotes-to-the-web-with-swift-and-webassembly-91065a349822c565"
canonical: "https://www.swift.org/blog/bringing-goodnotes-to-web-with-swift/"
source: "Swift.org"
published: "2026-06-01"
difficulty: "medium"
kind: "Case study"
reading_minutes: 7
tags: ["swift","webassembly","concurrency","frontend","performance"]
---

# Bringing Goodnotes to the web with Swift and WebAssembly

A post on [Swift.org](https://swe.quest/sources/swift.md), published 2026-06-01, 7 min read, Case study. Original: [https://www.swift.org/blog/bringing-goodnotes-to-web-with-swift/](https://www.swift.org/blog/bringing-goodnotes-to-web-with-swift/)

## Summary

Goodnotes runs the same Swift code behind its iPad app in browsers by compiling it to WebAssembly with SwiftWasm, sharing 1.47M lines (66% of the 2.2M-line web codebase) including a rendering engine that targets Metal on iOS and WebGL on the web. The port required replacing libdispatch with Swift Concurrency, fixing code that assumed a 64-bit Int on wasm32, and abstracting I/O through dependency injection. WASI threads with Web Workers and SharedArrayBuffer, plus custom actor executors (SE-0392) that pin actors to specific workers, more than doubled INP but require cross-origin isolation. The roughly 50 MB binary (12 MB with Brotli) is cached with Service Workers, and Chrome DevTools debugging and a custom wasm-memprof heap profiler make the tooling workable. The WebAssembly support is upstreamed as of Swift 6.2.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Swift](https://swe.quest/tags/swift.md) (Languages)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- Swift Concurrency ([easy posts on Swift](https://swe.quest/tags/swift.md?difficulty=easy))
- WebAssembly basics ([easy posts on WebAssembly](https://swe.quest/tags/webassembly.md?difficulty=easy))
- Web Workers

## Keywords

SwiftWasm, JavaScriptKit, WASI Threads, SharedArrayBuffer, SE-0392, WebGL, wasm-memprof, Goodnotes

## Related posts

- [This Month in Ladybird - July 2026](https://swe.quest/articles/this-month-in-ladybird-july-2026-7519e340d470d9a1.md): Ladybird · 2026-07-31 · Medium · 11 min read · Browsers, Runtimes & VMs, Rust, Compilers, Memory safety
  Ladybird added private browsing, per-profile storage and sandboxing, undo/redo and rich-text editing, geolocation, and working WebAudio in July 2026, and moved most of LibWeb's style and layout pipeline to Rust.
- [This Month in Ladybird - May 2026](https://swe.quest/articles/this-month-in-ladybird-may-2026-432e99955958f19d.md): Ladybird · 2026-05-31 · Easy · 8 min read · Browsers, Runtimes & VMs, Rust, WebAssembly, Memory management
  Ladybird merged 464 pull requests in May 2026. It now passes Cloudflare Turnstile, and scrolling runs asynchronously on an out-of-process compositor with crash recovery.
- [Why is WebAssembly a second-class language on the web?](https://swe.quest/articles/why-is-webassembly-a-second-class-language-on-the-web-36ba94a05082ce89.md): Mozilla Hacks · 2026-02-26 · Medium · 13 min read · WebAssembly, Browsers, Language design, Performance engineering
  WebAssembly remains second-class on the web because it can only load code and reach Web APIs through JavaScript.
- [This Month in Ladybird - October 2026](https://swe.quest/articles/this-month-in-ladybird-october-2026-410e66f256b9c40e.md): Ladybird · 2026-10-31 · Easy · 10 min read · Browsers, Runtimes & VMs, Compilers, WebAssembly, Sandboxing & isolation
  Ladybird moved style, layout and paint recording onto separate threads that run concurrently with JavaScript, so CSS animations (including layout-affecting ones) and :hover keep working during long scripts, while layout queries from script wait for pending work to avoid stale data.
- [Introducing Turso in the Browser](https://swe.quest/articles/introducing-turso-in-the-browser-111a711a5e4d489d.md): Turso · 2025-10-08 · Medium · 3 min read · SQLite, WebAssembly, Browsers, Local-first & sync, JavaScript
  Turso, a from-scratch SQLite rewrite, now runs in the browser via WebAssembly as the npm package @tursodatabase/database-wasm, with a better-sqlite3-like API whose methods are all async because of OPFS.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
