From d94b1996d45b7f8786c7bb250f8d0103995451fe Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Sun, 2 Jun 2024 11:46:27 +0900 Subject: [PATCH 1/2] Fix the extension method's name from codegen --- flutter_ffi_plugin/bin/src/message.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter_ffi_plugin/bin/src/message.dart b/flutter_ffi_plugin/bin/src/message.dart index 87bbfe14..691a3f95 100644 --- a/flutter_ffi_plugin/bin/src/message.dart +++ b/flutter_ffi_plugin/bin/src/message.dart @@ -330,7 +330,7 @@ extension ${messageName}Extension on $messageName{ await insertTextToFile( dartPath, ''' -extension {$messageName}Extension on $messageName{ +extension ${messageName}Extension on $messageName{ void sendSignalToRust(Uint8List binary) { sendDartSignal( ${markedMessage.id}, From b5737ea8853570700b7c4d29df9ba3b135e22c3f Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Sun, 2 Jun 2024 11:50:42 +0900 Subject: [PATCH 2/2] Conform to CI results related to formatting --- documentation/docs/detailed-techniques.md | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/docs/detailed-techniques.md b/documentation/docs/detailed-techniques.md index 2e807e2c..a868d337 100644 --- a/documentation/docs/detailed-techniques.md +++ b/documentation/docs/detailed-techniques.md @@ -11,6 +11,7 @@ We've covered how to pass signals[^1] between Dart and Rust in the previous tuto It's important to note that creating a Protobuf `message` larger than a few megabytes is not recommended. For large data, split them into multiple signals, or use the `binary` field.[^2] [^1]: Rinf relies solely on native FFI for communication, avoiding the use of web protocols or hidden threads. The goal is to minimize performance overhead as much as possible. + [^2]: Sending a serialized message or binary data is a zero-copy operation from Rust to Dart, while it involves a copy operation from Dart to Rust in memory. Keep in mind that Protobuf's serialization and deserialization does involve memory copy. ## 🗃️ Generation Path