Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the extension method's name from codegen #346

Merged
merged 2 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading