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.
38 lines
1.2 KiB
Markdown
38 lines
1.2 KiB
Markdown
+++
|
|
title = "Set up ui/Trunk.toml and ui/index.html — build configuration and Wasm entry point"
|
|
priority = 8
|
|
status = "todo"
|
|
ticket_type = "task"
|
|
dependencies = ["c3503b", "a9534d"]
|
|
+++
|
|
|
|
<context>
|
|
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.
|
|
</context>
|
|
|
|
<goal>
|
|
Create `Trunk.toml` and `index.html` in the `quotesdb/` root (not `src/bin/ui/`):
|
|
1. `Trunk.toml` must specify `--bin ui` so Trunk compiles the `ui` binary, not the default `api` binary
|
|
2. `index.html` is the Trunk HTML entry point — it should `<link>` to compiled CSS and include the Wasm loader script tag
|
|
|
|
Verify `trunk serve` starts successfully.
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Resolve TRIAGE ticket 5e3e37 (CSS approach) before adding stylesheet links.
|
|
- The `Trunk.toml` `[build.cargo]` section must set `args = ["--bin", "ui"]`.
|
|
- `index.html` must include a `<div id="app">` mount point for the Yew app.
|
|
</constraints>
|
|
|
|
<validation>
|
|
From the `quotesdb/` directory:
|
|
|
|
```sh
|
|
trunk build
|
|
```
|
|
</validation>
|
|
|
|
<commit>
|
|
`chore(quotesdb): set up Trunk.toml and index.html for UI build`
|
|
</commit>
|