bevyengine / bevyengine/bevy-website
Change examples to use AppExit
- Dominant language
- JavaScript
- Stars
- 249
- Forks
- 450
- Avg merge
- 16h 20m
- Merged PRs (30d)
- 6
Description
## Describe the issue
Currently all examples on the website return `()` instead of `AppExit`, which is a pattern we should probably discourage.
[https://bevy.org/learn/quick-start/getting-started/ecs/]
```rust
fn main() {
App::new().add_systems(Update, hello_world).run();
}
```
## Proposed Solution
Change them to return AppExit
```rust
fn main() -> AppExit {
App::new().add_systems(Update, hello_world).run()
}
```
Contributor guide
Research direction
Start with the getting-started ECS example at https://bevy.org/learn/quick-start/getting-started/ecs/ and inspect the website source for the other examples mentioned in the issue. Update the examples so their main functions return AppExit, then verify the displayed snippets consistently use the proposed form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100