You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.9 KiB
1.9 KiB
+++
title = "Set up ui/Cargo.toml with Yew/Wasm dependencies (yew, yew-router, gloo, wasm-bindgen, serde, etc.)"
priority = 8
status = "done"
ticket_type = "task"
dependencies = ["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.
TRIAGE resolved (ticket 166996): use yew = "0.22", yew-router = "0.19", wasm-bindgen = "0.2" (compatible with wasm-bindgen-cli 0.2.108 in the Nix dev shell).
Add UI-side Yew/Wasm dependencies to `Cargo.toml` under `[target.'cfg(target_arch = "wasm32")'.dependencies]`. Use the following pinned versions:yew = "0.22"(latest stable: 0.22.1)yew-router = "0.19"(latest stable: 0.19.0, requires yew ^0.22.0)gloo— timers and fetch utilities for Yewwasm-bindgen = "0.2"(compatible with nix-shell wasm-bindgen-cli 0.2.108)web-sys— browser API bindingsserdewithderivefeatureserde_jsonwasm-bindgen-futures— for async fetch in Wasm
Also add serde and serde_json to [dependencies] (non-target-scoped) so shared lib types can use derive macros on both targets.
cargo fmt
cargo check
trunk build
`chore(quotesdb): set up ui Cargo dependencies for Yew/Wasm`