# ComfyUI Rust Frontend A native Rust frontend for ComfyUI-like AI image generation tool using egui. ## Features - Node-based workflow editor - Real-time preview pane - Integration with backend API - ROCm support through Rust bindings ## Architecture This frontend is built with: - `eframe` and `egui` for the UI framework - `reqwest` for HTTP communication with the backend - `serde` for JSON serialization/deserialization ## Project Structure ``` src/ ├── main.rs # Main application entry point ├── node_editor.rs # Node-based workflow editor implementation ├── node_panel.rs # Panel for selecting and managing nodes ├── preview_pane.rs # Preview pane for image results └── api_client.rs # Backend API communication layer ``` ## Running the Application 1. Make sure you have Rust installed (`rustup` or `curl https://sh.rustup.org/rustup.sh -sSf | sh`) 2. Start the backend server: ```bash cd ../backend && cargo run ``` 3. In another terminal, run the frontend: ```bash cd rust-frontend && cargo run ``` ## Building To build for release: ```bash cd rust-frontend && cargo build --release ``` The executable will be located at `target/release/comfyui-rust-frontend`. ## Integration with Backend This frontend communicates with the backend through HTTP API endpoints. The API client handles: - Fetching available node types from `/nodes` - Executing workflows via POST to `/execute` - Getting execution results and preview images The backend must be running on `http://localhost:8080` by default, but this can be configured in `src/main.rs`.