Registry / other / sdl2-sys

sdl2-sys

JSON →
library0.38.0rscratesunverified

Raw SDL2 bindings for Rust, used internally rust-sdl2.

# Cargo.toml [dependencies] sdl2-sys = "0.38.0"
INSTALL
IMPORT
SIG · SDL2-SYS
S
sdl2-sys
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_Init
use sdl2_sys::SDL_Init;

Initialize SDL2 using raw bindings.

use sdl2_sys::SDL_Init; use std::ffi::CString; fn main() { unsafe { SDL_Init(0); } println!("SDL initialized"); }
Debug
Known issues
gotchaUnsafe API; requires manual memory management
fix
Prefer the safe `sdl2` crate instead of raw bindings.
affects: >=0.38.0
Upgrade
Version history
0.38.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
sdl2-sys — cargo add sdl2-sys · libregistry