// Generated by uniffi-bindgen-react-native import installer from './NativeLoroReactNative'; // Register the rust crate with Hermes // - the boolean flag ensures this loads exactly once, even if the JS // code is reloaded (e.g. during development with metro). let rustInstalled = false; if (!rustInstalled) { installer.installRustCrate(); rustInstalled = true; } // Export the generated bindings to the app. export * from './generated/loro'; // Now import the bindings so we can: // - intialize them // - export them as namespaced objects as the default export. import * as loro from './generated/loro'; // Initialize the generated bindings: mostly checksums, but also callbacks. // - the boolean flag ensures this loads exactly once, even if the JS code // is reloaded (e.g. during development with metro). let initialized = false; if (!initialized) { loro.default.initialize(); initialized = true; } export * from './extension'; // Export the crates as individually namespaced objects. export default { loro, };