Rust-SDL2_image

Rust bindings for SDL2_image

Overview

Rust-SDL2image is a library for talking to the new SDL2image library from Rust.

Rust-SDL2_image uses the MIT license.

Requirements

Installation

If you're using Cargo to manage your project, enter the following into your Cargo.toml file:

toml [dependencies.sdl2_image] git = "https://github.com/xsleonard/rust-sdl2_image"

Otherwise, clone this repo and run:

bash cargo build

If you're not using Cargo, you can compile manually:

```bash git clone https://github.com/xsleonard/rust-sdl2image cd rust-sdl2image rustc src/sdl2_image/lib.rs

OR if you are using the mac framework version

rustc --cfg macframework src/sdl2image/lib.rs ```

Demo

You'll find included with the library a simple demo that loads and displays a given image :

bash cargo run /path/to/some/image.(jpg|png)

Or:

bash rustc -L. src/demo/main.rs -o demo ./demo image.(png|jpg)