Skip to content

Commit

Permalink
Update README, CHANGELOG and CONTRIBUTING.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvc94ch committed Jan 16, 2020
1 parent b742464 commit dc69646
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Expand Up @@ -10,4 +10,12 @@
# 0.2.0
- support windows
- nsis installer for windows
- new example UI
- new example UI

# 0.4.0
- use winit instead of glfw
- use custom flutter engine builds
- new cli tool `cargo-flutter`
- refactor engine to be window framework agnostic
- dropped tokio and libc dependencies
- move plugins to `flutter-plugins`
36 changes: 20 additions & 16 deletions CONTRIBUTING.md
@@ -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)
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -7,7 +7,7 @@

Build flutter desktop app in dart & rust.

![demo ui](https://raw.githubusercontent.com/flutter-rs/flutter-rs/master/www/images/demo_ui.png "Flutter app demo screenshot")
![flutter-app-template][flutter-app-template]

# Get Started

Expand All @@ -28,7 +28,7 @@ Build flutter desktop app in dart & rust.

## Distribute
- To build distribution, use:
`cargo flutter --format appimage build --release`# Install
`cargo flutter --format appimage build --release`

# Contribution
To contribute to flutter-rs, please see [CONTRIBUTING](CONTRIBUTING.md).
Expand All @@ -45,5 +45,6 @@ To contribute to flutter-rs, please see [CONTRIBUTING](CONTRIBUTING.md).
[crates-url]: https://crates.io/crates/flutter-engine
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[mit-url]: LICENSE-MIT
[flutter-app-template]: https://user-images.githubusercontent.com/741807/72476798-5a99e280-37ee-11ea-9e08-b0175ae21ad6.png
[demo-ui]: https://raw.githubusercontent.com/flutter-rs/flutter-rs/master/www/images/demo_ui.png

0 comments on commit dc69646

Please sign in to comment.