agbrs_flash 0.4.0

Crate for persisting game data to a GBA cartridge using Rust failed to build agbrs_flash-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure builds.
If you believe this is' fault, open an issue.
Visit the last successful build: agbrs_flash-0.2.1


agbrs_flash is a crate that allows for persisting game data to a GBA cartridge flash chip. Currently it only supports 1M cartridges and it auto-identifies the resulting ROM as such.

It makes use of postcard to serialize the object and store it in the flash memory.



use alloc::string::{String, ToString};
use alloc::vec::Vec;
use serde::{Serialize, Deserialize};

extern crate alloc;

#[derive(Serialize, Deserialize)]
struct TestObject {
    pub id: usize,
    pub text: String,

fn main(mut gba: agb::Gba) -> ! {
    let have_struct = agbrs_flash::MEMORY.have_structure();
    agb::println!("Have structure? {}", have_struct);
    if !have_struct {
        agbrs_flash::MEMORY.write_structure(&TestObject {
            id: 1,
            text: "Hello World!".to_string(),
        agb::println!("Restart to see the stored data")
    } else {
        let obj: TestObject = agbrs_flash::MEMORY.read_structure().unwrap();
        agb::println!("id: {} text: {}",, obj.text);