#sdl2

no-std bin+lib fermium

An opinionated crate of SDL2 bindings

45 releases (16 stable)

20016.1.1 Dec 9, 2021
20016.0.0 Nov 1, 2021
20014.4.2 Apr 4, 2021
20014.4.1 Mar 4, 2021
0.0.15 Jun 11, 2019

#5 in No standard library

Download history 165/week @ 2021-10-02 104/week @ 2021-10-09 110/week @ 2021-10-16 311/week @ 2021-10-23 288/week @ 2021-10-30 536/week @ 2021-11-06 619/week @ 2021-11-13 469/week @ 2021-11-20 549/week @ 2021-11-27 583/week @ 2021-12-04 381/week @ 2021-12-11 314/week @ 2021-12-18 495/week @ 2021-12-25 428/week @ 2022-01-01 493/week @ 2022-01-08 375/week @ 2022-01-15

1,841 downloads per month
Used in 11 crates (7 directly)

Zlib OR Apache-2.0 OR MIT

11MB
241K SLoC

C 193K SLoC // 0.1% comments Objective-C 13K SLoC // 0.1% comments Visual Studio Project 9K SLoC Shell 9K SLoC // 0.2% comments C++ 7K SLoC // 0.2% comments Rust 4.5K SLoC // 0.0% comments Java 2.5K SLoC // 0.2% comments Perl 1.5K SLoC // 0.1% comments GNU Style Assembly 661 SLoC // 0.2% comments Visual Studio Solution 461 SLoC JavaScript 286 SLoC // 0.4% comments Automake 168 SLoC // 0.0% comments PowerShell 161 SLoC // 0.4% comments RPM Specfile 94 SLoC Batch 94 SLoC // 0.0% comments Python 77 SLoC // 0.0% comments Prolog 15 SLoC

Minimum Rust Version crates.io docs.rs

fermium

Rust bindings to the SDL2 library, version 2.0.16

This crate bundles the source for SDL2 and then builds it for you. In other words, you do not need to have installed SDL2 yourself. You do need a C compiler, but everyone has one of those, even on Windows.

Versioning

SDL2 does not follow SemVer.

Under SDL2's version scheme, the numbers are what SemVer would call major.major.minor. In other words, 2.0.10 is a compatible API upgrade from 2.0.9, and 2.1.0 is a breaking upgrade from 2.0.9.

Also, as of 2.0.10, they moved to a Linux style "even numbers are releases" version. The current stable version is 2.0.14, and the next stable version will be 2.0.16.

Because SDL2 doesn't follow SemVer, it's slightly harder for fermium to follow SemVer.

Since I want it to be very easy to identify what version of SDL2 is bundled in what version of fermium, we use the full SDL2 release version as the major version number of this crate:

SDL2-2.0.14 --> fermium-20014.0.0

Updates within a fermium major version will all target the same SDL2 version, and follow the normal SemVer rules.

FAQ

  • Lokathor, why does your crate have such a stupid name?
    • Well, this started as raw layer for a crate called beryllium, to replace its usage of sdl2-sys with something new. Since sdl2-sys was already taken, I needed another name, and I decided to pick another element to go with the first element. Somewhat at random, I just decided to check out element 100 on wikipedia, and it was apparently discovered in the fallout of the first hydrogen bomb. I thought to myself, "well that's cool enough, I guess.", and now we're here.

Project Logo

birth of fermium

Dependencies

_a