diff --git a/flutter_package/lib/src/load_os.dart b/flutter_package/lib/src/load_os.dart index 9c08e892..8f14ae7b 100644 --- a/flutter_package/lib/src/load_os.dart +++ b/flutter_package/lib/src/load_os.dart @@ -67,6 +67,20 @@ typedef SendDartSignalWrap = void Function( int, ); +/// Abstract class for unifying the interface +/// for calling native functions. +abstract class RustLibrary { + void startRustLogic(); + void stopRustLogic(); + void prepareIsolate(int port); + void storeDartPostCObject(PostCObjectPtr postCObject); + void sendDartSignal( + int messageId, + Uint8List messageBytes, + Uint8List binary, + ); +} + // Direct access to global function symbols loaded in the process. // These are available only if the native library is // loaded into global space with `RTLD_GLOBAL` configuration. @@ -111,20 +125,6 @@ external void sendDartSignalExtern( int binaryLength, ); -/// Abstract class for unifying the interface -/// for calling native functions. -abstract class RustLibrary { - void startRustLogic(); - void stopRustLogic(); - void prepareIsolate(int port); - void storeDartPostCObject(PostCObjectPtr postCObject); - void sendDartSignal( - int messageId, - Uint8List messageBytes, - Uint8List binary, - ); -} - /// Class for global native library symbols loaded with `RTLD_GLOBAL`. /// This is the efficient and ideal way to call native code. /// `@Native` decorator with `isLeaf` parameter