pub unsafe fn load_library<P: AsRef<Path>>(
path: P,
) -> Result<(), DynamicLoadingError>Expand description
Loads the AIC dynamic library from an explicit path.
This is optional: if it is never called, the library is loaded automatically on first
use from the platform’s default name (libaic.so / libaic.dylib / aic.dll) via the OS
loader search path. Call this when you need to choose the exact file instead.
It must run before the first SDK call; once the library is loaded (explicitly or
automatically) it is kept for the rest of the process so function pointers and SDK-owned
objects stay valid, and a later call returns DynamicLoadingError::AlreadyLoaded.
§Safety
path must point to a dynamic library that is ABI-compatible with the bundled aic.h
header used to build these bindings. Loading an incompatible library can cause undefined
behavior when its functions are called.