2013-08-17 10:43:55 +01:00
# Rust-SDL2
2013-10-29 08:59:37 +00:00
[](https://travis-ci.org/AngryLawyer/rust-sdl2)
2013-08-17 10:43:55 +01:00
Bindings for SDL2 in Rust
2013-10-29 08:59:37 +00:00
2013-08-17 10:43:55 +01:00
# Overview
2013-08-17 02:27:55 -07:00
2013-08-17 10:43:55 +01:00
Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust. Low-level C components are wrapped in Rust code to make them more idiomatic and abstract away inappropriate manual memory management.
2013-08-20 08:37:19 +01:00
Rust-SDL2 is still in very early stages of development, and probably won't work for a little while.
2013-08-17 10:43:55 +01:00
Rust-SDL2 uses the MIT license.
If you want a library compatible with earlier versions of SDL, please see https://github.com/brson/rust-sdl
2013-10-02 20:36:42 +01:00
## Where are SDL_image, SDL_mixer, and SDL_ttf?
2014-02-07 09:21:13 +00:00
These live outside of the repo.
* https://github.com/xsleonard/rust-sdl2_image
2014-04-02 11:19:39 +08:00
* https://github.com/andelf/rust-sdl2_ttf
2014-04-09 11:36:19 +08:00
* https://github.com/andelf/rust-sdl2_mixer
2014-04-16 19:27:34 +08:00
* https://github.com/andelf/rust-sdl2_gfx
2013-10-02 20:36:42 +01:00
2013-08-17 10:43:55 +01:00
# Requirements
* *Rust* - we currently compile against the *Master* branch. The releases on http://www.rust-lang.org tend to not work.
* *SDL2.0 development libraries* - install through your favourite package management tool, or via http://www.libsdl.org/
# Installation
2014-03-25 10:22:01 -05:00
Clone this repo run `make` . To see an example of the code in use, *make demo* .
2013-08-17 10:43:55 +01:00
# Demo
To compile the demo:
2013-12-09 20:09:25 +01:00
> rustpkg install demo
2013-08-17 10:43:55 +01:00
Then run:
2013-12-09 20:09:25 +01:00
> ./bin/demo
2013-08-17 10:43:55 +01:00
Or you could instead just use
> make demo
# When things go wrong
2013-09-23 13:47:58 +01:00
Rust, and Rust-SDL2, are both still heavily in development, and you may run into teething issues when using this. Before panicking, check that you're using the latest Master branch of Rust, check that you've updated Rust-SDL2 to the latest version, and run `make clean` . If that fails, please let us know on the issue tracker.