claude-memory/graph/decisions/sba-scout-python-to-rust-tui-migration-recommended-stack-and-2cf305.md
2026-02-28 10:53:58 -06:00

2.4 KiB

id type title tags importance confidence created updated relations
2cf3058c-85f4-481a-bbe7-17ebb9b9e908 decision SBA Scout Python-to-Rust TUI migration: recommended stack and approach
sba-scout
rust
migration
ratatui
research
decision
tui
0.7 0.8 2026-02-23T18:05:05.367031+00:00 2026-02-28T16:53:58.777098+00:00
target type direction strength edge_id
c9add129-283a-445a-8dff-4525ec7fa9b6 BUILDS_ON incoming 0.9 5cde624d-cbf0-456b-aa87-076e7e999dde
target type direction strength edge_id
4dc83eed-b0b1-4924-b82e-faf352426785 FOLLOWS incoming 0.7 b8e47bac-8b05-4e2c-b0a0-bd7683ced31f
target type direction strength edge_id
bc4abc6e-57c1-4d6c-b414-213c1367be9b FOLLOWS incoming 0.8 0dfd7245-6d94-4a78-84a8-dae22a15fbb1
target type direction strength edge_id
1768d9ab-0c21-4ec3-bb04-bd70366f6240 RELATED_TO incoming 0.7 8b24bed4-38a2-4a70-8b5e-de2782c897e0

SBA Scout Python-to-Rust TUI Migration Research

Context

SBA Scout is a Python TUI app using Textual + SQLAlchemy + httpx + pydantic-settings. Research was conducted to evaluate converting it to Rust.

  • UI: ratatui 0.30 + crossterm
  • Async runtime: tokio
  • Database: sqlx 0.8.6 (sqlite, async)
  • HTTP client: reqwest 0.12.28
  • Config: figment 0.10.19
  • Serialization: serde + toml
  • Math: pure f64 (no external crate needed)
  • Rust edition: 2024

Alternative Stack (Option B - Higher Abstraction)

  • UI: tui-realm 3.3 on top of ratatui
  • Config: config-rs 0.15.19 with YAML

Rejected Libraries

  • Diesel: rejected — no async SQLite support
  • rusqlite: rejected — sync only, not Send
  • serde_yaml: deprecated — migrate config to TOML instead of YAML

Migration Order

  1. Data structs (models)
  2. sqlx queries (database layer)
  3. API client (reqwest)
  4. Config (figment)
  5. First screen: Roster (screens layer)
  6. Iterate remaining screens

Key Challenges

  • Calc layer is the easiest port (pure math, f64)
  • Screens are the hardest: ratatui is immediate-mode (draw loop), while Textual is retained-mode (component tree with reactive state)
  • Async patterns differ significantly between Python and Rust

Reference

Full research saved to NoteDiscovery at projects/sba-scout/rust-tui-migration-research.