···77# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8899[dependencies]
1010-agb = "0.8.0"
1010+agb = "0.9.1"
11111212[profile.release]
1313panic = "abort"
+13-3
src/main.rs
···11+// Games made using `agb` are no_std which means you don't have access to the standard
22+// rust library. This is because the game boy advance doesn't really have an operating
33+// system, so most of the content of the standard library doesn't apply.
44+//
55+// Provided you haven't disabled it, agb does provide an allocator, so it is possible
66+// to use both the `core` and the `alloc` built in crates.
17#![no_std]
88+// `agb` defines its own `main` function, so you must declare your game's main function
99+// using the #[agb::entry] proc macro. Failing to do so will cause failure in linking
1010+// which won't be a particularly clear error message.
211#![no_main]
31244-extern crate agb;
513use agb::{display, syscall};
6141515+// The main function must take 1 arguments and never return. The agb::entry decorator
1616+// ensures that everything is in order. `agb` will call this after setting up the stack
1717+// and interrupt handlers correctly. It will also handle creating the `Gba` struct for you.
718#[agb::entry]
88-fn main() -> ! {
99- let mut gba = agb::Gba::new();
1919+fn main(mut gba: agb::Gba) -> ! {
1020 let mut bitmap = gba.display.video.bitmap3();
11211222 for x in 0..display::WIDTH {