#graphics #game #sfml

sf2g

Minimal Rust binding for SFML2 Graphics submodule

5 releases (3 breaking)

Uses new Rust 2024

0.4.0 May 31, 2025
0.3.1 May 30, 2025
0.3.0 May 1, 2025
0.2.0 Apr 25, 2025
0.1.0 Apr 19, 2025

#268 in Graphics APIs

Download history 8/week @ 2025-11-11 12/week @ 2025-11-18 15/week @ 2025-11-25 9/week @ 2025-12-02 7/week @ 2025-12-09 6/week @ 2025-12-16 11/week @ 2025-12-23 10/week @ 2025-12-30 3/week @ 2026-01-06 13/week @ 2026-01-13 20/week @ 2026-01-20 19/week @ 2026-01-27 16/week @ 2026-02-03 9/week @ 2026-02-10 16/week @ 2026-02-17 13/week @ 2026-02-24

55 downloads per month
Used in 2 crates

zlib-acknowledgement

2MB
31K SLoC

C++ 21K SLoC // 0.2% comments Rust 6K SLoC // 0.0% comments Objective-C++ 4K SLoC // 0.3% comments Objective-C 195 SLoC // 0.5% comments Shell 1 SLoC

sf2g

Minimal Rust bindings for the Graphics module of SFML 2, the Simple and Fast Multimedia Library. Fork of rust-sfml.

Platform support

Platform Development and testing CI (basic tests)
🐧 Linux ✅ Most tested Status
🪟 Windows (MSVC) ⚠️ Rarely tested. Looking for testers/maintainers! Status
🐧 -> 🪟 (mingw-w64) ⚠️ Cross-compile from Linux to Windows. Somewhat tested.
🍎 Mac OS X ❌ Untested. Looking for testers/maintainers! Status

Prerequisites

  • Rust 1.86 or later
  • CMake, and a C++ toolchain for building SFML
  • 🐧 On Linux, you need the following dependencies installed:
    • Window module: libGL libX11 libXcursor libXrandr
    • Graphics module: libfreetype

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.

Dependencies

~9MB
~187K SLoC