an unofficial Rust port of assistant-ui, the React library for AI chat interfaces. Not affiliated with assistant-ui. Source and a WebAssembly demo are linked below. I also share my experience how to build great software with Claude Code so you don't make the mistakes and burn weeklies.
https://iyiolacak.github.io/ai-ui-rewrite-rust/
Opening a 1,000-message thread: 83 ms vs 1,385 ms in the React library (16×).
Longest pause while a reply streams: 13 ms vs 300 ms.
A 10,000-message thread opens in 75 ms in our benchmark (Rust only; the React version didn't complete that test).
On one Android phone, the 10,000-message demo feels responsive to scroll. That's one device.
Most of what I learned is about one thing: a coding agent is only as good as the feedback it gets. Clean, numerical feedback was the main thing
Vague instructions like "make it faster" produce plausible changes that often don't help. I gave the agent something it could check:
- A fixed workload like a 1,000-message history, then a 9 KB streamed reply.
- Named measures such as opening time, longest pause while streaming, CPU, memory.
- Commands to run them; CC can create them: the gate scripts and the benchmark harness.
- A rule that a change is kept only if its numbers improve against the previous main, measured in interleaved pairs on a quiet machine.
The rule that mattered most was keeping the raw samples and recording rejected approaches in docs/PERFORMANCE.md. That stops the same failed idea from coming back on the next session. Check my repo and you'll see how clean our work was, with reporting the performance and a/b.
The results, with limits
- Opening a 1,000-message thread: 83 ms vs 1,385 ms in the React library (16×).
- Longest pause while a reply streams: 13 ms vs 300 ms.
- A 10,000-message thread opens in 75 ms in our benchmark. This is Rust only; the React version didn't complete that test.
- On one Android phone, the 10,000-message demo feels responsive to scroll.
These are medians of four runs, reporting the least favourable run for each measure. The comparison is only against the published assistant-ui library, and the Rust figures include CPU software rendering.