When I started building Wakeway with the kids (Part 1 covers how we prompted for game feel), I wanted to showcase to people how they can do a lot of things in browser or on device that they didn't know was possible.
The default reflex right now for anything labeled 'AI' is a cloud API, a running server, and a token bill. For an arcade harbor game, that falls apart fast. Network lag ruins steering. Offline play breaks on a plane or road trip. And nobody wants an API bill because someone played 20 rounds of Sunny Cove.
I never specified a file size target or even asked for Rust. I just said I wanted Wakeway to run in WebAssembly across phone, tablet, and desktop. Gemini 4 Neon picked the rest, including building the core engine in Rust. Version one compiled to 79.9 KB gzipped. Even after adding 7 more harbors (10 total) and V-shaped boat wakes, it is still just 85 KB (smaller than a single phone screenshot). It opens fast on weak cell data, costs zero to serve when a link spikes, and let me push 30 quick playtests over a weekend without nursing a server.
Here is the bigger lesson. A coding agent put together the Rust simulation, the offline collision avoidance bot, and the static hosting setup in just a few sessions. That infrastructure used to take weeks. Today, gameplay mechanics are still the hardest thing when the LLM can build the rest. Keeping the runtime small and offline got server plumbing out of the way so we could spend our time on what made the harbor fun.
Here is how the offline browser core splits from the static host and scoreboard backend.

What an 85 KB WebAssembly engine actually buys you
HTML5 Canvas2D is great for drawing sunlit water and reading clicks or touches. Keeping movement identical across phones, tablets, and laptops is harder once you add six boat types, curved turning paths, timed drawbridges, and a Daily Shift where everyone competes on the same run.
Compiling the harbor simulation from Rust into WebAssembly solved three real problems at once.
- Instant play with zero loading bar. Because harbor layouts compile into compact data instead of heavy level files, expanding from 3 harbors to 10 only added 5 KB (smaller than an app icon). You tap the link on spotty mobile signal and start steering right away.
- Identical game speed and fair Daily Shifts on every device. Every frame advances the simulation by the same fixed step and hands one snapshot to the browser to draw, so an older phone and a fast laptop run at the exact same speed with zero server lag. The exact same compiled engine computes the
HARBOR_BOTpar score from a daily seed, so every player faces the identical sequence of boats. - Zero server compute for gameplay. The entire game sits as plain static files on
davenporter.com/wakeway/.
Because there is no live game backend to keep in sync, I could tweak boat turning speeds or slip spacing, rebuild in seconds, and hand my phone to the kids to playtest.
Three in browser agents, zero cloud calls
People hear 'in browser AI' and picture a 2 GB local model downloading before anything works (or a cloud API call behind every move). That is fine for a lab demo. It fails the second someone taps a link on their phone and wants to dock a speedboat in three seconds. You do not need a language model to decide whether two hulls are about to collide.
In Wakeway, the 'intelligence' splits into two layers: fast deterministic math for live gameplay, and optional language flavor where words actually fit.
| Layer | Where it runs | Latency | Offline | What it does |
|---|---|---|---|---|
ORCA First Mate and HARBOR_BOT | Rust WASM | < 1 ms/frame | Yes | Maps safe steering lanes around moving hulls for copilot help. |
| Adaptive Harbor Director | Rust WASM | < 1 ms/frame | Yes | Watches active boats and close calls to pace busy waves and breathers. |
| Telemetry Radio Debrief | Rust WASM | < 1 ms | Yes | Summarizes close calls and bottlenecks at the end of a shift. |
Built in LanguageModel flavor | Desktop Chrome | Async | Optional | Rewrites short radio flavor with a strict timeout fallback. |
The first three run on every device. None of them need a GPU. Every frame, the First Mate uses ORCA (a fast geometric check that rules out colliding speeds and headings) to preview safe lanes or steer boats out of trouble. Each check takes under a millisecond, so steering never stutters. Meanwhile, the Adaptive Director watches crowding and close calls to alternate busy peaks with brief breathers (and turns itself off on Daily Shifts so everyone gets the same spawns).
The 'copilot' does not need to be an LLM at runtime, even though I used an LLM to design and build it. Putting live steering decisions in a tiny WebAssembly module keeps the game fast and offline. Sending steering ticks to a cloud LLM would add lag, break airplane play, and burn tokens on a geometry problem.
The iOS Safari reality check
We wanted Wakeway to play on the phones and iPads our kids actually use, not just a developer laptop running Chrome. Halfway through the design session, I asked a simple question. Can Safari on iOS call Siri or an Apple Intelligence endpoint from a web app?
No. Apple keeps Apple Intelligence and its Foundation Models framework strictly inside native Swift apps. Safari and WebKit expose no Siri or window.ai API to web pages or home screen web apps on iPhone / iPad.
Safari 26+ does ship WebAssembly and WebGPU by default. That gap settled the architecture. Browser support for built in LLM API's is still highly varied, and we designed Wakeway so gameplay never needs an LLM in the first place. We still wired in desktop Chrome's built in LanguageModel (with a strict AbortSignal timeout and silent fallback) to add optional radio debrief flavor where supported. Across iPhone, iPad, Android, and desktop, the 85 KB Rust WebAssembly core delivers the exact same gameplay agents with zero giant model downloads blocking first play.
Cloud learnings: static hosting plus a scoreboard that sleeps
Running gameplay offline still left one piece that actually needed a server: a global Daily Shift scoreboard. Early builds ran on a standalone Cloud Run URL. That was fast to deploy during playtests, but a fresh visit risked waiting on a sleeping container to wake up, and moving the game onto davenporter.com immediately triggered browser cross origin blocks. So I asked the agent a plain cost and hosting question.
if we run a global 'scoreboard' how is that implemented and what is the estimated cost? can we do it for free? I would host this on davenporter.com but since it's wasm does it need a running container?That question separated the static game files from a tiny scoreboard backend behind Firebase Hosting.
- Serve the game as static files on
davenporter.com/wakeway/. Long term caching loads repeat visits straight from browser cache. WebAssembly permissions stay scoped strictly to/wakeway/instead of opening up the rest of the site. - Route only
/wakeway/api/to a tiny Go and Cloud Firestore scoreboard on Cloud Run. It sleeps at zero instances when idle. Keeping the API on the same domain removes slow cross origin browser checks, and locking the allowlist todavenporter.com(plus Capacitor for a future mobile build) avoids wildcard access. - Protect the free tier by design. Zero secrets ship in the browser bundle. A 30 second in memory cache absorbs bursts, and per IP write rate limits stop a traffic spike from running up a bill.
Because the static files and compiled .wasm engine are completely self contained, wrapping them in Capacitor with native phone haptics also leaves a direct path to an offline iOS App Store build later without rewriting game logic.
When the LLM builds the stack, gameplay is still the hard part
Step back from the architecture and one thing stands out. Writing a deterministic Rust WebAssembly sim, wiring ORCA collision avoidance, and splitting static hosting from a zero idle scoreboard used to take weeks. A coding agent built all of it in a few sessions once I stated the intent (run in WebAssembly across phone, tablet, and desktop, work offline, and keep gameplay server cost at zero).
That did not make the game fun.
Gameplay mechanics are still the hardest thing when the LLM can build the rest. The model faithfully built single boat docks that felt unfair, trackpad drag controls that kept looping, and yellow sandbar ovals nobody could read. Tests stayed green while the game felt flat. Getting multi boat slips, click to waypoint steering, and harbor pacing right still took playing live builds with the kids, pasting screenshots, and rethinking the rules.
Having an 85 KB static bundle removed server lag, deploy friction, and cloud bills. That freed up time for the one layer the model still cannot judge for you.
Try it offline
Open Wakeway, press A on desktop to turn on the copilot overlay, and watch the collision avoidance lanes update in real time. Then turn off your Wi-Fi. The harbor keeps running smoothly without a single network call.
Put real time decisions in a tiny WebAssembly file, treat browser LLMs as optional polish, serve static bundles from your main domain, and save the cloud for the small slice of shared state (like a leaderboard) that actually needs a server. Then spend the time you saved on the actual feel of what you are building.
Let me know in the comments!