Skip to content

Commit

Permalink
Merge pull request #346 from cunarist/fix-extension-methods
Browse files Browse the repository at this point in the history
Fix the extension method's name from codegen
  • Loading branch information
temeddix authored Jun 2, 2024
2 parents 6652d5b + b5737ea commit 3a1b808
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions documentation/docs/detailed-techniques.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion flutter_ffi_plugin/bin/src/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 3a1b808

Please sign in to comment.