Skip to content

Commit

Permalink
Fix simple README (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka authored Sep 4, 2024
1 parent 5391a3e commit e5f4a46
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@ The simple template will create the following project structure:
```text
src/
├── app.rs -> holds the state and application logic
├── event.rs -> handles the terminal events (key press, mouse click, resize, etc.)
├── main.rs -> entry-point
```

## Design choices

We use [color-eyre](https://docs.rs/color-eyre/latest/color_eyre/) for simplifying any errors that
need to be reported to the console.

We have a small `App` struct that has a main loop that calls methods to handle events and draw the
ui.
ui. The app can be quit by pressing any of Q/Esc/Ctrl+C.

Events are read on a secondary thread and collated into a single mpsc channel. This allows a tick
event to be interspersed with other events like keyboard and mouse. The Tick event is a useful place
to perform updates to animations or to do external polling.

The app can be quit by pressing any of Q/Esc/Ctrl+C.
We use [color-eyre](https://docs.rs/color-eyre/latest/color_eyre/) for simplifying any errors that
need to be reported to the console.

0 comments on commit e5f4a46

Please sign in to comment.