[GH-ISSUE #105] [FR] How is the communication between Flutter and Rust frontend implemented? #49

Closed
opened 2026-03-23 20:31:01 +00:00 by mirror · 8 comments
Owner

Originally created by @fzyzcjy on GitHub (Nov 30, 2021).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/105

Hi thanks for this wonderful project that replaces notion! I am very curious how the communication between Flutter and Rust frontend is implemented? I have looked at the source code and it seems that it only encodes the whole request/response into an action and a byte-array payload.

Therefore, I wonder the code can be simplified using flutter_rust_bridge, a high-level memory-safe binding generator for Flutter/Dart <-> Rust. With that, just simply write down a Rust function declaration, and the Dart side is automatically generated with rich type support and safety.

(Disclaimer: I wrote that lib and used it in my 200kloc project in production environment)

Originally created by @fzyzcjy on GitHub (Nov 30, 2021). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/105 Hi thanks for this wonderful project that replaces notion! I am very curious how the communication between Flutter and Rust frontend is implemented? I have looked at the [source code](https://github.com/AppFlowy-IO/appflowy/blob/main/frontend/rust-lib/dart-ffi/src/protobuf/proto/ffi_response.proto) and it seems that it only encodes the whole request/response into an action and a byte-array payload. Therefore, I wonder the code can be simplified using [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge), a high-level memory-safe binding generator for Flutter/Dart <-> Rust. With that, just simply write down a Rust function declaration, and the Dart side is automatically generated with rich type support and safety. (Disclaimer: I wrote that lib and used it in my 200kloc project in production environment)
mirror 2026-03-23 20:31:01 +00:00
  • closed this issue
  • added the
    notes
    label
Author
Owner

@annieappflowy commented on GitHub (Dec 1, 2021):

I'm glad that you asked :D
We had evaluated flutter_rust_bridge when we coded up the project. Unfortunately, it doesn't satisfy our needs. We're still open to this package though. If you'd like to discuss further, you can find me on Discord. We also welcome you to join our community!

<!-- gh-comment-id:983313792 --> @annieappflowy commented on GitHub (Dec 1, 2021): I'm glad that you asked :D We had evaluated flutter_rust_bridge when we coded up the project. Unfortunately, it doesn't satisfy our needs. We're still open to this package though. If you'd like to discuss further, you can find me on Discord. We also welcome you to join our community!
Author
Owner

@fzyzcjy commented on GitHub (Dec 1, 2021):

@annieappflowy Hi thanks for your reply and interest! Appflowy sounds quite promising and wonderful. flutter_rust_bridge has evolved and new features have been added, and corner cases have been better recently. Its architecture is also quite easy to use and modify, and I always respond quickly to PRs. I will join discord.

<!-- gh-comment-id:983315634 --> @fzyzcjy commented on GitHub (Dec 1, 2021): @annieappflowy Hi thanks for your reply and interest! Appflowy sounds quite promising and wonderful. flutter_rust_bridge has evolved and new features have been added, and corner cases have been better recently. Its architecture is also quite easy to use and modify, and I always respond quickly to PRs. I will join discord.
Author
Owner

@fzyzcjy commented on GitHub (Dec 1, 2021):

I am in Discord now (as fzyzcjy). Where should I talk?

<!-- gh-comment-id:983316582 --> @fzyzcjy commented on GitHub (Dec 1, 2021): I am in Discord now (as fzyzcjy). Where should I talk?
Author
Owner

@annieappflowy commented on GitHub (Dec 1, 2021):

I am in Discord now (as fzyzcjy). Where should I talk?

I'm adding you

<!-- gh-comment-id:983320329 --> @annieappflowy commented on GitHub (Dec 1, 2021): > I am in Discord now (as fzyzcjy). Where should I talk? I'm adding you
Author
Owner

@fzyzcjy commented on GitHub (Dec 1, 2021):

I see

<!-- gh-comment-id:983321473 --> @fzyzcjy commented on GitHub (Dec 1, 2021): I see
Author
Owner

@fzyzcjy commented on GitHub (Dec 6, 2021):

👀

<!-- gh-comment-id:986354475 --> @fzyzcjy commented on GitHub (Dec 6, 2021): 👀
Author
Owner

@fzyzcjy commented on GitHub (Dec 24, 2021):

@annieappflowy How is it going? flutter_rust_bridge is going to be even more powerful in the future (e.g. https://github.com/fzyzcjy/flutter_rust_bridge/issues/243), thus by migrating to flutter_rust_bridge, appflowy no longer needs to spend time reinventing the wheel.

<!-- gh-comment-id:1000616863 --> @fzyzcjy commented on GitHub (Dec 24, 2021): @annieappflowy How is it going? flutter_rust_bridge is going to be even more powerful in the future (e.g. https://github.com/fzyzcjy/flutter_rust_bridge/issues/243), thus by migrating to flutter_rust_bridge, appflowy no longer needs to spend time reinventing the wheel.
Author
Owner

@MikeWallaceDev commented on GitHub (Dec 24, 2021):

It's interesting, might be something to look at in the future.

<!-- gh-comment-id:1000621702 --> @MikeWallaceDev commented on GitHub (Dec 24, 2021): It's interesting, might be something to look at in the future.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#49
No description provided.