Skip to main content

flake

Attribute Macro flake 

Source
#[flake]
Expand description

§Flake Main Function

A macro designed to make writing flake apps easier. Does some of the heavy lifting and allows the main function to be async (Required so that the window doesn’t freeze when running an async task).

§Examples

§Simple window:

use flake::prelude::*;

#[flake]
async fn main() {
    loop {
        next_frame().await
    }
}

§Window with custom title

#[flake("Hello")]  // sets the title of the window to `Hello`
async fn main() {
    loop {
        next_frame().await
    }
}

§Window that skips the taskbar

#[flake(skip_taskbar = true)]
async fn main() {
    loop {
        next_frame().await
    }
}