AngryLawyer/rust-sdl2 — pull request #235 by jdeseno (2014-12-17 18:05:02+00:00)
Title: Copy SDL2_image as an optional feature

This adds [SDL2_image](https://github.com/xsleonard/rust-sdl2_image) as an example for #233. Enabling this in a project is as easy as adding this to your `Cargo.toml`:

``` toml
[dependencies.sdl2]
features = ["image"]
```

The extension source has been added under `src/sdl2_image`. This is not required but, without it there is a circular dependency and adding the crate via the `path` directive gets around this. If a `sys` or `ll` crate is created for all the direct ffi, then all of the primary crates could depend on this and the circle would be broken.

My motivation for doing this would be to encourage a consistent & working API for the extensions, so moving the source is desirable from my point of view.