Attribute Macro agb::entry

source ·
#[entry]
Expand description

This macro declares the entry point to your game written using agb.

It is already included in the template, but your main function must be annotated with #[agb::entry], takes 1 argument and never returns. Doing this will ensure that agb can correctly set up the environment to call your rust function on start up.

Examples

#![no_std]
#![no_main]

use agb::Gba;

#[agb::entry]
fn main(mut gba: Gba) -> ! {
    loop {}
}