Code Monkey home page Code Monkey logo

rust-sdl's Introduction

Rust-SDL

Bindings for SDL in Rust

Overview

Rust-SDL is a library for talking to SDL from Rust. Low-level C components are wrapped in Rust code to make them more idiomatic and abstract away inappropriate manual memory management.

In addition, it provides optional APIs to a number of common SDL extension libraries.

Rust-SDL uses the MIT license.

Requirements

  • Rust - we currently compile against the Master branch. The releases on http://www.rust-lang.org tend to not work.
  • SDL 1.2 development libraries - install through your favourite package management tool, or via http://www.libsdl.org/

Optional

Installation

Clone this repo, run ./configure, and then make. To see an example of the code in use, make demos. If you don't want SDL_Mixer (if you aren't using sound) or SDL_Image (if you're not using image formats other than BMP) then you can exclude them from make by setting RUSTFLAGS. For example, if you wish to use just SDL_Image, RUSTFLAGS="--cfg image" make

Demo

To compile the demo:

rustc -L$PWD/src demo/demo.rc

Then run:

./demo/demo

When things go wrong

Rust, and Rust-SDL, 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-SDL to the latest version, and run make clean and ./configure. If that fails, please let us know on the issue tracker.

rust-sdl's People

Contributors

angrylawyer avatar brson avatar pcwalton avatar robn avatar mmeyerho avatar frozencow avatar lifthrasiir avatar sfackler avatar fzzzy avatar dpc avatar itdaniher avatar noj avatar jdm avatar z0w0 avatar bblum avatar eholk avatar erickt avatar nightpool avatar luqmana avatar nielsegberts avatar nikomatsakis avatar rossmurray avatar mstewartgallus avatar catamorphism avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.