bevyengine / bevyengine/bevy-website

Change examples to use AppExit

Open
#2,214 1 comment 0 reactions 0 assignees View on GitHub
A-Book C-Correction X-Controversial
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.