[][src]Struct bevy_app::App

pub struct App {
    pub world: World,
    pub resources: Resources,
    pub runner: Box<dyn Fn(App)>,
    pub schedule: Schedule,
    pub executor: ParallelExecutor,
    pub startup_schedule: Schedule,
    pub startup_executor: ParallelExecutor,

Containers of app logic and data

App store the ECS World, Resources, Schedule, and Executor. They also store the "run" function of the App, which by default executes the App schedule once. Apps are constructed using the builder pattern.


Here is a simple "Hello World" Bevy app:

use bevy_app::prelude::*;
use bevy_ecs::prelude::*;

fn main() {

fn hello_world_system() {
   println!("hello world");


world: Worldresources: Resourcesrunner: Box<dyn Fn(App)>schedule: Scheduleexecutor: ParallelExecutorstartup_schedule: Schedulestartup_executor: ParallelExecutor


impl App[src]

pub fn build() -> AppBuilder[src]

pub fn update(&mut self)[src]

pub fn initialize(&mut self)[src]

pub fn run(self)[src]

Trait Implementations

impl Default for App[src]

Auto Trait Implementations

impl !RefUnwindSafe for App

impl !Send for App

impl !Sync for App

impl Unpin for App

impl !UnwindSafe for App

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Downcast for T where
    T: Any

impl<T> From<T> for T[src]

impl<T> FromResources for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,