A greeting form built with Rust and egui. Type a name and see a personalized greeting appear instantly.
- Text input with
text_edit_singleline() Stringstate to hold user input&mutbinding for live updates- Conditional display with
is_empty()
- Rust installed (rustup.rs)
- eframe 0.31
cargo run| Concept | Code |
|---|---|
| Text input | ui.text_edit_singleline(&mut self.name) |
| String state | name: String in App struct |
| Mutable binding | &mut self.name |
| Empty check | !self.name.is_empty() |
| Format greeting | format!("Hello, {}!", self.name) |
Learn egui in Neovim — Build desktop apps with Rust and egui, coded entirely in Neovim.
Taught by CelesteAI