rgrit

Crates.iorgrit
lib.rsrgrit
version0.1.1
created_at2025-01-13 01:04:05.371662+00
updated_at2025-01-13 01:04:05.371662+00
descriptionA Rust interface to grit - the GBA Image Transmogrifier with batteries included!
homepagehttps://github.com/not-jan/rgrit
repositoryhttps://github.com/not-jan/rgrit
max_upload_size
id1513918
size31,059
(not-jan)

documentation

https://docs.rs/rgrit

README

rgrit - Rust bindings for grit

Crates.io Version docs.rs Crates.io License

This crate provides a Rust interface to grit - the GBA Image Transmogrifier (“grit” for short). It is a bitmap conversion tool for GBA/NDS development.

The bindings are generated using bindgen.

The manual for grit can be found here.

Building

git clone https://github.com/not-jan/rgrit.git
cd rgrit
git submodule update --init
cargo build

Requirements

MacOS

brew install automake libtool freeimage llvm

I'm not sure if llvm is required, but it's probably a good idea to install it anyway.

Linux (Ubuntu / Debian)

sudo apt-get install autoconf build-essential libtool libfreeimage-dev

Windows

Untested, but might work.

Usage

use rgrit::StaticBitmap;

const BACKGROUND: StaticBitmap = rgrit::grit! {
    "assets/test.png",
    transparency = Disabled,
    bit_depth = 16,
    format = Bitmap,
};

fn main() {
    dbg!(&BACKGROUND);
}
Commit count: 24

cargo fmt