Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README, CHANGELOG and CONTRIBUTING.
- Loading branch information
Showing
3 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
# Contributing guideline to flutter-rs | ||
|
||
Thank you for your interest in contributing to flutter-rs! We have many areas that could use some help. | ||
|
||
- Desktop intergration: We provide several plugins to intergrate with native desktop UI, such as clipboard, dialog... but more is needed. | ||
- Flutter Desktop GUI: Flutter is mainly for mobile. Desktop app need desktop widgets, such as context menu. | ||
Thank you for your interest in contributing to flutter-rs! We have many areas | ||
that could use some help. | ||
|
||
- Reporting and fixing platform specific bugs. | ||
- Desktop intergration: We provide several plugins to intergrate with native | ||
desktop UI, such as clipboard, dialog... but more is needed. | ||
- Flutter Desktop GUI: Flutter is mainly for mobile. Desktop app need desktop | ||
widgets, such as context menu. | ||
- Documentation. | ||
|
||
## Structure | ||
This project is cargo workspace with multiple targets. | ||
|
||
- `flutter-engine` is the library that make flutter run. It create a window using glfw and provide MethodChannel struct to iterop with flutter/dart. It also provide an async runtime using tokio. | ||
|
||
When an engine instance is run, a `platform_message_callback` is pass to flutter engine using C ffi. A registry is also created to listen to flutter MethodChannel calls. Various plugins is registered with the registry using `add_plugin` method. Later, when flutter request native implementation using `MethodChannel`, the callback previously passed as `platform_message_callback` is called, which select one plugin in the registry to handle the message. | ||
|
||
- `flutter-engine-sys` is the crate for ffi with flutter engine C apis. It generate bindings using bindgen automaticly. | ||
|
||
- `flutter-app-demo` is a demo project that showcase various features of flutter-rs. | ||
- `flutter-app-demo/lib`: Dart code to create demo UI. | ||
- `flutter-app-demo/rust`: Rust code that uses flutter-engine to to start a flutter runtime. | ||
- `flutter-winit` creates an event loop and a window and interfaces with the | ||
`flutter-engine` crate. | ||
|
||
- `flutter-download` is used by cargo to download libflutter at build time. | ||
- `flutter-engine` is the library that make flutter run. It provides a | ||
`MethodChannel` struct to iterop with flutter and dart. | ||
|
||
- `www` folder is various github website assets. | ||
When an engine instance is run, a `platform_message_callback` is passed to | ||
flutter engine using C ffi. A registry listens to flutter `MethodChannel` | ||
calls. Various plugins are registered with the registry using the `add_plugin` | ||
method. When flutter makes a native platform request, the callback is called | ||
and processed by a registered plugin. | ||
|
||
- `flutter-engine-sys` is the crate for ffi with flutter engine C apis. It | ||
generates bindings using bindgen. | ||
|
||
## Reference | ||
- [Custom-Flutter-Engine-Embedders](https://github.com/flutter/flutter/wiki/Custom-Flutter-Engine-Embedders) | ||
- [Desktop Embedding for Flutter](https://github.com/google/flutter-desktop-embedding) | ||
- [Desktop Embedding for Flutter](https://github.com/google/flutter-desktop-embedding) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters