Skip to main content

emit_windows_obs_delay_load

Function emit_windows_obs_delay_load 

Source
pub fn emit_windows_obs_delay_load()
Expand description

Emits the linker flags required to delay-load obs.dll on Windows.

Call this from the application’s build.rs when the executable links libobs/libobs-wrapper directly and wants to bootstrap OBS before the first OBS symbol is used. Cargo does not propagate rustc-link-arg from a dependency’s build script to the final executable, so this helper must run in the final application’s build script.

On non-Windows targets this is a no-op so a cross-platform build script can call it unconditionally.

§Panics

Panics for Windows toolchains whose delay-load linker convention is not supported by this helper.