NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4732 most downloaded on crates.io
Raw SDL2 bindings for Rust, used internally rust-sdl2
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
PR #1473 BREAKING CHANGE Fix UB in ToColor implementations and remove implementation for isize.
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.
One column per quarter.
PR #1378 BREAKING CHANGE Change Keycode to be a struct rather than an enum. Fix Keycode::from_scancode for non-QWERTY keyboard layouts.
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.
PR #1270 BREAKING CHANGE Remove &mut self requirement in TimerSubsystem::delay; Add TimerSubsystem::ticks64
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
PR #1189 Added AudioQueue::queue_audio and deprecated AudioQueue::queue
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
Nothing published for this version
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, y…
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.
PR #1100 Added binding for SDL_GetDisplayUsableBounds
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.
PR #1086 Update bundled to use SDL2 2.0.14
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)
PR #1027: upgrade "bundled" version of SDL2 to 2.0.12 PR #1020: revert undefined behavior introduction. Commit: Fix clippy issue Commit: Temporarily s
PR #1012 Fix use after free with AudioDevice::open and AudioDevice::open\_queue
PR #964: Breaking change: Change joystick instance IDs from i32 to u32.
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.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
PR #868: Added inplace operations for rect::Point.
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.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Updated version in README
Updated version in README
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Version 0.1.0 - Compatible with Rust beta
Version 0.1.0 - Compatible with Rust beta
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →