Skip to main content

has_webp_support

Function has_webp_support 

Source
fn has_webp_support() -> bool
Expand description

Checks whether the loaded MuPDF library exports fz_load_webp.

§Safety

RTLD_DEFAULT is valid because the process loader resolves global symbols — MuPDF’s linked library (or a dependency) exports fz_load_webp. The byte string b"fz_load_webp\0".as_ptr() is null-terminated and lives in static memory for the call’s duration. The cast to *const _ is sound: dlsym expects a C string pointer, and we only check is_null() without dereferencing the symbol.