+++ title = "Set up ui/Cargo.toml with Yew/Wasm dependencies (yew, yew-router, gloo, wasm-bindgen, serde, etc.)" priority = 8 status = "todo" ticket_type = "task" dependencies = ["c3503b", "166996"] +++ The `quotesdb` UI is a Yew (Rust → Wasm) single-page app compiled by Trunk and hosted on Cloudflare Pages. It communicates with the backend API via `fetch` calls. Source lives in `src/bin/ui/`. Run with `trunk serve` for local development. Add UI-side Yew/Wasm dependencies to `Cargo.toml` under `[target.'cfg(target_arch = "wasm32")'.dependencies]`. Resolve TRIAGE ticket 166996 (Yew version selection) first, then add: `yew`, `yew-router`, `gloo` (timers, fetch), `wasm-bindgen`, `web-sys`, `serde`, `serde_json`, and `wasm-bindgen-futures`. - Resolve TRIAGE ticket 166996 (Yew + yew-router version compatibility) before pinning versions. - All UI dependencies must be scoped to the wasm32 target — they must not appear in host builds. - `wasm-bindgen` version must be compatible with the `wasm-bindgen-cli` version in the Nix dev shell. Use `superpowers:verification-before-completion` — run `trunk build` to confirm WASM compilation succeeds. From the `quotesdb/` directory: ```sh cargo fmt cargo check trunk build ``` `chore(quotesdb): set up ui Cargo dependencies for Yew/Wasm`