PackageTrack
Sign in Get early access

sdl2-sys

Raw SDL2 bindings for Rust, used internally rust-sdl2

0.38.0 4.8M downloads/mo #4604 most downloaded on crates.io rust-sdl2/rust-sdl2

What this package is like to depend on

Last release 1 years ago

12 Jul 2025

Release timing varies

gaps range from 3 weeks to 1.8 years

Rarely documented

notes for 13 of 58 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

59 releases · first in 2015

0 releases in the last 12 months

see the full history below

Release timeline

59 releases · Jan 2015 to Jul 2025
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 59
  1. 0.38.0 12 Jul 2025
    Release notes

    PR #1493 Add Rect::origin and specifies origin location in Rect::new.

    PR #1472 Add Canvas::render_geometry, Canvas::render_geometry_raw and an example that uses them both. Both these bindings use SDL_RenderGeometryRaw.

    PR #1473 BREAKING CHANGE Fix UB in ToColor implementations and remove implementation for isize.

    PR #1414 Use TTF_GlyphIsProvided32 and TTF_GlyphMetrics32 instead of the 16 bit ones.

    PR #1435 BREAKING CHANGE Fix some undefined behavior. Breaking changes: mixer::Chunk's fields are now private and callbacks to TimerSubsystem::add_timer must now live for 'static, also allowing some lifetime parameters to be removed.

    PR #1461 BREAKING CHANGE Added new SensorType variants: LeftGyroscope, RightGyroscope, LeftAccelerometer, RightAccelerometer

    PR #1461 BREAKING CHANGE Sensor::get_data now returns correct SensorData::Gyro enum

    PR #1437 BREAKING CHANGE Prevent users from creating Sdl2TtfContext out of nothing and use SDL's reference counting init/quit

    PR #1464 Added binding for Mix_OpenAudioDevice

    PR #1451 Add gamma_ramp_arrays and calculate_gamma_ramp.

    PR #1459 BREAKING CHANGE Fix image and mixer init flag logic. image::init and mixer::init will now return an error if any of the requested formats can not be initialized.

    PR #1444 Add texture scale mode api + fix unsafe

    PR #1415 Store gfx::framerate::FPSmanager directly in FPSManager instead of on the heap.

    PR #1450 BREAKING CHANGE Create ClippingRect type, to disambiguate between no and zero area clipping rect.

    PR #1416 Apply clippy fixes, fix deprecations and other code quality improvements.

    PR #1408 Allow comparing Versions, add constant with the version the bindings were compiled with.

    PR #1407 Add new use_ios_framework for linking to SDL2.framework on iOS

    PR #1427 BREAKING CHANGE Add system locale support. A new event type Event::LocaleChanged has been added.

    Open source →
  2. 0.37.0 13 Jun 2024
    Release notes

    PR #1406 Update bindings to SDL 2.0.26, add Event.is_touch() for mouse events, upgrade wgpu to 0.20 in examples

    PR #1398 Fix bug in rect.shift logic

    PR #1404 Make SdlDrop a zero sized type.

    PR #1394 Do not pull the SDL repository if not using bundled in build.rs

    PR #1394 Fix static linking

    PR #1389 Fix some undefined behavior.

    PR #1378 BREAKING CHANGE Change Keycode to be a struct rather than an enum. Fix Keycode::from_scancode for non-QWERTY keyboard layouts.

    PR #1390 Apply clippy fixes, fix deprecations and other code quality improvements.

    PR #1385 Upgrade raw-window-handle to 0.6.0

    PR #1380 Add controller vendor_id() and product_id()

    PR #1368 Remove unnecessary unsafe in Window interface. Make Window Clone.

    PR #1366 Add Primary Selection bindings.

    Open source →
  3. 0.36.0 22 Nov 2023
    Release notes

    PR #1270 BREAKING CHANGE Remove &mut self requirement in TimerSubsystem::delay; Add TimerSubsystem::ticks64

    PR #1275 BREAKING CHANGE Update raw-window-handle to 0.5

    PR #1225 Update wgpu to 0.12 in examples

    PR #1250 Add lib64 to native library search path when using bundled feature

    PR #1240 BREAKING CHANGE Take PixelMasks by reference

    PR #1254 BREAKING CHANGE Make SdlDrop and SubsystemDrop safer; forbid external code from constructing SdlDrop

    PR #1318 Add NV12, NV21 to PixelFormatEnum

    PR #1332 Fix size_hint implementations for {audio,video,render}::DriverIterator

    PR #1333 Implement FusedIterator, DoubleEndedIterator, and nth[_back] for {audio,video,render}::DriverIterator

    PR #1337 Fix "Cannot initialize Sdl from more than one thread" for tests / CI

    PR #1346 Add basic Shaped Window support

    PR #1314 Add "ALWAYS ON TOP" support for X11

    Open source →
  4. 0.35.2 06 Feb 2022
    Release notes

    PR #1173 Fix segfault when using timer callbacks

    PR #1183 WinRT support for raw-window-handle

    PR #1182 Updated raw-window-handle to 0.4

    PR #1189 Added AudioQueue::queue_audio and deprecated AudioQueue::queue

    PR #1164 Added raw-window-handle support for Android

    PR #1165 Added binding for SDL_GetDisplayOrientation and SDL_DISPLAYEVENT

    Open source →
  5. 0.35.1 25 Oct 2021

    Nothing published for this version

  6. 0.35.0 18 Oct 2021
    Release notes
    • BREAKING CHANGE Update sdl2-sys/sdl_bindings.rs to use enums instead of consts. If you were using sdl2-sys's enum variants directly in your project, you may be affected. If you only used sdl2 calls, there should not be any problems.

    • BREAKING CHANGE SDL 2.0.14 or higher is now recommended due to the new binding being added for SDL_OpenURL. If you get linking errors, upgrade your SDL2 libraries, or swap to using the bundled feature.

    PR #1138 Added binding for SDL_OpenURL

    PR #1150 Do not download SDL2 sources when using bundled feature

    PR #1112 Add wrapper functions for SDL_RenderSetIntegerScale and SDL_RenderGetIntegerScale

    PR #1156 Maybe breaking change: new variants to enum GameController, and prevent panic with unrecognized buttons.

    PR #1153 SDL_GL_GetCurrentContext and SDL_RenderFlush added.

    PR #1131 Added Sensor API.

    Open source →
  7. 0.34.5 27 Apr 2021
    Release notes

    PR #1100 Added binding for SDL_GetDisplayUsableBounds

    PR #1102 Correctly se linux and macSO built libraries when using bundled without static-link.

    PR #1098 Fix potential heap corruption when using AudioCVT::convert

    PR #1088 Rollback of PR #1081: Broke dynamic linking on Windows

    Various fixes to CI.

    Open source →
  8. 0.34.4 02 Apr 2021
    Release notes

    PR #1086 Update bundled to use SDL2 2.0.14

    PR #1033 Changed signature of TimerSubsystem::ticks to accept &self.

    PR #1057: fix memory safety bug in set_error

    PR #1081: Allow bundled build to be built in debug mode. Fixes issue when linking binary with mixed debug+release CRT dependencies.

    PR #1080: Fix line endings of patches to lf so patching of sources works on Windows.

    PR #1031: Add patch to fix metal detection (https://bugzilla.libsdl.org/show_bug.cgi?id=4988)

    Open source →
  9. 0.34.3 13 Sep 2020
    Release notes

    PR #1027: upgrade "bundled" version of SDL2 to 2.0.12 PR #1020: revert undefined behavior introduction. Commit: Fix clippy issue Commit: Temporarily suppress dangerous clippy hints PR#1014: add load_texture_bytes interface for load texture from buffer

    Open source →
  10. 0.34.2 27 Jun 2020
    Release notes

    PR #1012 Fix use after free with AudioDevice::open and AudioDevice::open_queue

    PR #1010 Fix compilation with gcc10.

    PR #1009 Add support for linking to development libraries from vcpkg, and automatically setting up a vcpkg installation using cargo-vcpkg.

    Open source →
  11. 0.34.0 25 Apr 2020
    Release notes

    PR #962: Added raw-window-handle support for Windows, Linux (X11 and Wayland) and macOS.

    PR #964: Breaking change: Change joystick instance IDs from i32 to u32.

    PR #965: Added invert method for Color, and added more Color names as constants.

    PR #968 Pass SDL2 include directories to sdl2-sys's dependant crates through DEP_SDL2_INCLUDE.

    PR #970 Add Chunk::from_buffer in mixer.

    PR #976 Fix compilation with use-bingen feature.

    PR #977 Add cpuinfo::has_avx2 and cpuinfo::has_avx512f

    PR #982 Support for loading Opus format in mixer.

    PR #980 Fix compilation on Windows.

    Open source →
  12. 0.33.0 24 Jan 2020

    Nothing published for this version

  13. 0.32.6 04 Apr 2019

    Nothing published for this version

  14. 0.32.5 23 Dec 2018

    Nothing published for this version

  15. 0.32.4 08 Dec 2018

    Nothing published for this version

  16. 0.32.3 06 Dec 2018

    Nothing published for this version

  17. 0.32.2 06 Dec 2018
    Release notes

    PR #868: Added inplace operations for rect::Point.

    PR #827: Added 32-bit array pixelformats

    PR #824: Added controller::set_rumble and joystick::set_rumble, wrappers for SDL_GameControllerRumble and SDL_JoystickRumble respectively.

    PR #867: Added Window::opacity and Window::set_opacity, wrappers for SDL_GetWindowOpacity and SDL_SetWindowOpacity respectively. This bumps the minimum SDL2 version requirement from 2.0.4 to 2.0.5.

    Open source →
  18. 0.32.1 10 Oct 2018

    Nothing published for this version

  19. 0.32.0 09 Oct 2018

    Nothing published for this version

  20. 0.31.0 09 Nov 2017

    Nothing published for this version

  21. 0.30.0 14 May 2017

    Nothing published for this version

  22. 0.30.0-beta 05 May 2017 pre-release

    Nothing published for this version

  23. 0.27.3 05 Apr 2017

    Nothing published for this version

  24. 0.27.2 23 Dec 2016

    Nothing published for this version

  25. 0.27.0 09 Dec 2016

    Nothing published for this version

  26. 0.26.0 29 Nov 2016
    Release notes

    Updated version in README

    Open source →
  27. 0.25.0 05 Nov 2016

    Nothing published for this version

  28. 0.24.0 07 Oct 2016

    Nothing published for this version

  29. 0.23.0 12 Sep 2016

    Nothing published for this version

  30. 0.22.0 28 Jul 2016

    Nothing published for this version

  31. 0.21.0 05 Jul 2016

    Nothing published for this version

  32. 0.19.0 03 May 2016

    Nothing published for this version

  33. 0.8.1 03 Mar 2016

    Nothing published for this version

  34. 0.8.0 05 Jan 2016

    Nothing published for this version

  35. 0.7.0 10 Nov 2015

    Nothing published for this version

  36. 0.6.2 03 Aug 2015

    Nothing published for this version

  37. 0.6.1 27 Jul 2015

    Nothing published for this version

  38. 0.6.0 22 Jul 2015

    Nothing published for this version

  39. 0.5.0 22 Jun 2015

    Nothing published for this version

  40. 0.4.0 26 May 2015

    Nothing published for this version

  41. 0.3.0 18 May 2015

    Nothing published for this version

  42. 0.2.2 23 Apr 2015

    Nothing published for this version

  43. 0.2.1 14 Apr 2015

    Nothing published for this version

  44. 0.2.0 13 Apr 2015

    Nothing published for this version

  45. 0.1.0 08 Apr 2015
    Release notes

    Version 0.1.0 - Compatible with Rust beta

    Open source →
  46. 0.0.34 07 Apr 2015

    Nothing published for this version

  47. 0.0.33 26 Mar 2015

    Nothing published for this version

  48. 0.0.32 25 Mar 2015

    Nothing published for this version

  49. 0.0.31 17 Mar 2015

    Nothing published for this version

  50. 0.0.29 16 Mar 2015

    Nothing published for this version

  51. 0.0.27 23 Feb 2015

    Nothing published for this version

  52. 0.0.26 17 Feb 2015

    Nothing published for this version

  53. 0.0.25 09 Feb 2015

    Nothing published for this version

  54. 0.0.23 02 Feb 2015

    Nothing published for this version

  55. 0.0.22 30 Jan 2015

    Nothing published for this version

  56. 0.0.20 28 Jan 2015

    Nothing published for this version

  57. 0.0.19 26 Jan 2015

    Nothing published for this version

  58. 0.0.16 12 Jan 2015

    Nothing published for this version

  59. 0.0.14 05 Jan 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive