Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simple README #78

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.