sdl2 breaking changes
sdl2 0.39.0 (November 18, 2026) is its newest release with breaking changes, 44 of them. The first: Bindgen whitelist removes platform and compiler specific items from sdl2-sys in sdl2 0.39.0. Every breaking API change we have recorded in sdl2 on crates.io: 44 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 0.39.0, released November 18, 2026. Source repository
Its 0.39.0 release requires Rust 1.80 or later. Rust end of life dates.
sdl2 0.39.0 breaking changes
- Removed
Bindings now emit only SDL related items, so platform or compiler specific items are no longer available. github.com - Behavior changed
Bundled SDL2 is updated to 2.32.10 and bindgen only emits SDL-related items, dropping platform or compiler specific items. github.com - Behavior changed
BlendMode
Adds a binding for SDL_ComposeCustomBlendMode. Code relying on internal details of BlendMode and SDL_BlendMode may break. github.com - Configuration changed
The crate now needs Rust 1.80 or later because lazy_static was replaced with std::sync::LazyLock. github.com - Signature changed
SDL_Keymod
Code matching on SDL_Keymod as a Rust enum must be updated to use the newtype. github.com - Signature changed
SDL_RendererFlip
Code matching on SDL_RendererFlip as a Rust enum must be updated to use the bitfield type. github.com - Signature changed
SDL_SysWMinfo
Its fields can no longer be accessed directly; use the raw-window-handle feature to get native window handles. github.com - Signature changed
SDL_SysWMmsg
Their fields can no longer be accessed directly; use the raw-window-handle feature to get native window handles. github.com - Signature changed
sdl2::audio::AudioCallback
AudioCallback gained a 'static bound to avoid a soundness hole, so callbacks must satisfy it. crates.io - Signature changed
sdl2::audio::AudioDevice::lock
Was fn lock(&mut self) -> AudioDeviceLockGuard<CB>; now fn lock(&mut self) -> AudioDeviceLockGuard<'_, CB>. crates.io - Signature changed
sdl2::event::EventWatch
Was struct EventWatch<'a, CB: EventWatchCallback + 'a>; now struct EventWatch<CB: EventWatchCallback>. crates.io - Signature changed
sdl2::event::EventWatchCallback
EventWatchCallback gained Send and 'static bounds to avoid a soundness hole, so callbacks must satisfy them. crates.io - Signature changed
sdl2::EventPump::keyboard_state
Was fn keyboard_state(&self) -> crate::keyboard::KeyboardState; now fn keyboard_state(&self) -> crate::keyboard::KeyboardState<'_>. crates.io - Signature changed
sdl2::EventPump::poll_iter
Was fn poll_iter(&mut self) -> EventPollIterator; now fn poll_iter(&mut self) -> EventPollIterator<'_>. crates.io - Signature changed
sdl2::EventPump::wait_iter
Was fn wait_iter(&mut self) -> EventWaitIterator; now fn wait_iter(&mut self) -> EventWaitIterator<'_>. crates.io - Signature changed
sdl2::EventPump::wait_timeout_iter
Was fn wait_timeout_iter(&mut self, timeout: u32) -> EventWaitTimeoutIterator; now fn wait_timeout_iter(&mut self, timeout: u32) -> EventWaitTimeoutIterator<'_>. crates.io - Signature changed
sdl2::gfx::rotozoom::RotozoomSurface::rotate_90deg
Was fn rotate_90deg(&self, turns: i32) -> Result<Surface, String>; now fn rotate_90deg(&self, turns: i32) -> Result<Surface<'_>, String>. crates.io - Signature changed
sdl2::gfx::rotozoom::RotozoomSurface::rotozoom
Was fn rotozoom(&self, angle: f64, zoom: f64, smooth: bool) -> Result<Surface, String>; now fn rotozoom(&self, angle: f64, zoom: f64, smooth: bool) -> Result<Surface<'_>, String>. crates.io - Signature changed
sdl2::gfx::rotozoom::RotozoomSurface::rotozoom_xy
Was fn rotozoom_xy(&self, angle: f64, zoomx: f64, zoomy: f64, smooth: bool) -> Result<Surface, String>; now fn rotozoom_xy(&self, angle: f64, zoomx: f64, zoomy: f64, smooth: bool) -> Result<Surface<'_>, String>. crates.io - Signature changed
sdl2::gfx::rotozoom::RotozoomSurface::shrink
Was fn shrink(&self, factorx: i32, factory: i32) -> Result<Surface, String>; now fn shrink(&self, factorx: i32, factory: i32) -> Result<Surface<'_>, String>. crates.io - Signature changed
sdl2::gfx::rotozoom::RotozoomSurface::zoom
Was fn zoom(&self, zoomx: f64, zoomy: f64, smooth: bool) -> Result<Surface, String>; now fn zoom(&self, zoomx: f64, zoomy: f64, smooth: bool) -> Result<Surface<'_>, String>. crates.io - Signature changed
sdl2::image::LoadTexture::load_texture
Was fn load_texture<P: AsRef<Path>>(&self, filename: P) -> Result<Texture, String>; now fn load_texture<P: AsRef<Path>>(&self, filename: P) -> Result<Texture<'_>, String>. crates.io - Signature changed
sdl2::image::LoadTexture::load_texture_bytes
Was fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture, String>; now fn load_texture_bytes(&self, buf: &[u8]) -> Result<Texture<'_>, String>. crates.io - Signature changed
sdl2::keyboard::KeyboardState::pressed_scancodes
Was fn pressed_scancodes(&self) -> PressedScancodeIterator; now fn pressed_scancodes(&self) -> PressedScancodeIterator<'_>. crates.io - Signature changed
sdl2::keyboard::KeyboardState::scancodes
Was fn scancodes(&self) -> ScancodeIterator; now fn scancodes(&self) -> ScancodeIterator<'_>. crates.io - Signature changed
sdl2::mouse::MouseState::mouse_buttons
Was fn mouse_buttons(&self) -> MouseButtonIterator; now fn mouse_buttons(&self) -> MouseButtonIterator<'_>. crates.io - Signature changed
sdl2::mouse::MouseState::pressed_mouse_buttons
Was fn pressed_mouse_buttons(&self) -> PressedMouseButtonIterator; now fn pressed_mouse_buttons(&self) -> PressedMouseButtonIterator<'_>. crates.io - Signature changed
sdl2::mouse::RelativeMouseState::mouse_buttons
Was fn mouse_buttons(&self) -> MouseButtonIterator; now fn mouse_buttons(&self) -> MouseButtonIterator<'_>. crates.io - Signature changed
sdl2::mouse::RelativeMouseState::pressed_mouse_buttons
Was fn pressed_mouse_buttons(&self) -> PressedMouseButtonIterator; now fn pressed_mouse_buttons(&self) -> PressedMouseButtonIterator<'_>. crates.io - Signature changed
sdl2::render::BlendMode
Was enum BlendMode; now struct BlendMode(pub SDL_BlendMode). crates.io - Signature changed
sdl2::render::BlendMode::Add
Was Add = SDL_BlendMode::SDL_BLENDMODE_ADD as i32; now const Add: Self. crates.io - Signature changed
sdl2::render::BlendMode::Blend
Was Blend = SDL_BlendMode::SDL_BLENDMODE_BLEND as i32; now const Blend: Self. crates.io - Signature changed
sdl2::render::BlendMode::Invalid
Was Invalid = SDL_BlendMode::SDL_BLENDMODE_INVALID as i32; now const Invalid: Self. crates.io - Signature changed
sdl2::render::BlendMode::Mod
Was Mod = SDL_BlendMode::SDL_BLENDMODE_MOD as i32; now const Mod: Self. crates.io - Signature changed
sdl2::render::BlendMode::Mul
Was Mul = SDL_BlendMode::SDL_BLENDMODE_MUL as i32; now const Mul: Self. crates.io - Signature changed
sdl2::render::BlendMode::None
Was None = SDL_BlendMode::SDL_BLENDMODE_NONE as i32; now const None: Self. crates.io - Signature changed
sdl2::render::CanvasBuilder::build
Was fn build(self) -> Result<WindowCanvas, IntegerOrSdlError>; now fn build(mut self) -> Result<WindowCanvas, IntegerOrSdlError>. crates.io - Signature changed
sdl2::render::TextureCreator::create_texture
Was fn create_texture<F>(&self, format: F, access: TextureAccess, width: u32, height: u32) -> Result<Texture, TextureValueError> where F: Into<Option<PixelFormatEnum>>,; now fn create_texture<F>(&self, format: F, access: TextureAccess... crates.io - Signature changed
sdl2::render::TextureCreator::create_texture_from_surface
Was fn create_texture_from_surface<S: AsRef<SurfaceRef>>(&self, surface: S) -> Result<Texture, TextureValueError>; now fn create_texture_from_surface<S: AsRef<SurfaceRef>>(&self, surface: S) -> Result<Texture<'_>, TextureValueError>. crates.io - Signature changed
sdl2::render::TextureCreator::create_texture_static
Was fn create_texture_static<F>(&self, format: F, width: u32, height: u32) -> Result<Texture, TextureValueError> where F: Into<Option<PixelFormatEnum>>,; now fn create_texture_static<F>(&self, format: F, width: u32, height: u32) ->... crates.io - Signature changed
sdl2::render::TextureCreator::create_texture_streaming
Was fn create_texture_streaming<F>(&self, format: F, width: u32, height: u32) -> Result<Texture, TextureValueError> where F: Into<Option<PixelFormatEnum>>,; now fn create_texture_streaming<F>(&self, format: F, width: u32, height: u32) ->... crates.io - Signature changed
sdl2::render::TextureCreator::create_texture_target
Was fn create_texture_target<F>(&self, format: F, width: u32, height: u32) -> Result<Texture, TextureValueError> where F: Into<Option<PixelFormatEnum>>,; now fn create_texture_target<F>(&self, format: F, width: u32, height: u32) ->... crates.io - Signature changed
sdl2::surface::SurfaceRef::set_blend_mode
Was fn set_blend_mode(&mut self, mode: BlendMode) -> Result<(), String>; now fn set_blend_mode(&mut self, blend: BlendMode) -> Result<(), String>. crates.io - Signature changed
sdl2::video::gl_attr::GLAttr::set_context_flags
Was fn set_context_flags(&self) -> ContextFlagsBuilder; now fn set_context_flags(&self) -> ContextFlagsBuilder<'_>. crates.io
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.