Registry / other / sdl2
library0.38.0rscratesunverified

SDL2 bindings for Rust

# Cargo.toml [dependencies] sdl2 = "0.38.0"
INSTALL
IMPORT
SIG · SDL2
S
sdl2
otherrustv0.38.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sdl
use sdl2::Sdl;

Initializes the SDL2 library.

use sdl2::Sdl; fn main() -> Result<(), Box<dyn std::error::Error>> { let _sdl_context = sdl2::init()?; Ok(()) }
Debug
Known issues
gotchaRequires SDL2 native library installed on the system.
fix
Install SDL2 development libraries (e.g., libsdl2-dev on Ubuntu, SDL2-devel on Fedora).
affects: >=0.0.0
Upgrade
Version history
0.38.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
sdl2 — cargo add sdl2 · libregistry