# ADR-030: Platform Capability Model (Substitutable Providers + Additive Plugins) --- **Metadata:** - **ID**: ADR-030 - **Status**: Proposed - **Date**: 2026-07-22 - **Tags**: [architecture, platform, wasm, web, capabilities, portability, plugins] - **Decision Type**: architecture_pattern - **Aligns with**: [G-02, G-03, P-05, P-02] - **Roadmap tier**: P1 - **Doc resolution**: R2 - **Related**: [ADR-007, ADR-008, ADR-015, ADR-016] - **Supersedes**: [] - **Superseded By**: [] --- ## Context **Problem**: We want a browser (`wasm32`) build without foreclosing native-only features (in-world browsers, local file import, the embedded solo sim), and without letting the browser's limits dictate the whole architecture. Today the client assumes native primitives throughout — raw TCP (`systems/network.rs`), an in-process `cartopolis_simulator` over loopback (`solo.rs`, ADR-016), blocking `ureq` on `std::thread::spawn` (tile/transit/overpass/lod22 loaders), `std::fs` caches, and `rusqlite` for offline mode. None of these exist in a browser sandbox. The naive fixes pull in opposite directions: design for the intersection of both platforms and native-only features become impossible; design for native and the web build won't compile. The framing trap is treating native as a **superset** of web. It isn't — opening a real link in a new tab or compositing an `