#sfml #multimedia #game

sys csfml-graphics-sys

Bindings to csfml-graphics

6 releases (breaking)

Uses old Rust 2015

0.6.0 Mar 28, 2021
0.5.0 Oct 19, 2019
0.4.0 Sep 9, 2017
0.3.0 Mar 11, 2017
0.1.0 Feb 13, 2016

#279 in Graphics APIs

Download history 260/week @ 2024-05-27 214/week @ 2024-06-03 148/week @ 2024-06-10 254/week @ 2024-06-17 261/week @ 2024-06-24 3/week @ 2024-07-01 95/week @ 2024-07-08 257/week @ 2024-07-15 190/week @ 2024-07-22 229/week @ 2024-07-29 184/week @ 2024-08-05 386/week @ 2024-08-12 200/week @ 2024-08-19 288/week @ 2024-08-26 279/week @ 2024-09-02 271/week @ 2024-09-09

1,084 downloads per month

zlib-acknowledgement

140KB
5K SLoC

rust-sfml Build Status crates.io Discord

Rust bindings for SFML, the Simple and Fast Multimedia Library.

Requirements

  • Linux, Windows, or OS X
  • Rust 1.70 or later
  • SFML 2.6
  • A C++ compiler for building CSFML

Environment variables

If you get errors about SFML headers not being found, or linker errors, that probably means SFML is not installed in a global location. In that case, you can set two environment variables to help rust-sfml find the required files:

  • SFML_INCLUDE_DIR. Set this to the include folder of your SFML location.
  • SFML_LIBS_DIR. Set this to the lib folder of your SFML location.

To help debugging environment variables, you can try building with cargo build -vv. If the environment variables are set correctly, you should get warnings like this:

warning: Custom SFML include dir: C:\Users\You\sfml\include
warning: Adding custom SFML libs search path C:\Users\You\sfml\lib

TIP: To set the environment variables of a cargo project, you can use the {project_dir}/.cargo/config.toml file documented here: https://doc.rust-lang.org/cargo/reference/config.html#env

Documentation

The API documentation is available at: https://docs.rs/sfml/

If you need help with setting up rust-sfml on your system, you can take a look at the wiki.
Please take note that:

  • This wiki is supported by the community
  • The rust-sfml core team doesn't review it
  • Your contribution is welcome

License

This software is a binding of the SFML library created by Laurent Gomila, which is provided under the Zlib/png license.

This software is provided under the same license as SFML, the Zlib/png license.

Discord

rust-sfml users are welcome on the Official SFML Discord server

Dependencies