ensureInitialized static method
Ensure the FFI library is loaded in the current isolate. Must be called before static cancel operations. Safe to call multiple times (idempotent, first-write-wins).
The libraryPath parameter is ignored — with native asset hooks, the
library is resolved automatically by the Dart runtime. It is retained
for API compatibility with MontyCancelRegistry.registerNativeCancel.
Implementation
static void ensureInitialized([String? libraryPath]) {
_instance ??= NativeBindingsFfi();
}