1use crate::app::App;
25use crate::prelude::{clear_background, Color};
26pub use flake_macros::main as flake;
27
28mod app;
29mod camera;
30mod draw_state;
31pub mod prelude;
32mod input;
33mod model;
34mod state;
35mod global;
36mod misc;
37mod runtime;
38
39pub type FlakeResult = anyhow::Result<()>;
40
41pub fn run_async(fut: impl Future<Output = ()> + 'static) -> FlakeResult {
42 App::run(fut)?;
43 Ok(())
44}
45
46pub fn run_with_bg(color: Color, fut: impl Future<Output = ()> + 'static) -> FlakeResult {
47 clear_background(color);
48 run_async(fut)
49}
50
51#[macro_export]
52macro_rules! end_frame {
53 () => {next_frame().await};
54}