diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d0fc96f..60c7f392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,4 +10,12 @@ # 0.2.0 - support windows - nsis installer for windows -- new example UI \ No newline at end of file +- 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` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a5c65ad..0c2c7d0b 100644 --- a/CONTRIBUTING.md +++ b/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) \ No newline at end of file +- [Desktop Embedding for Flutter](https://github.com/google/flutter-desktop-embedding) diff --git a/README.md b/README.md index a5e1238a..8a81f655 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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). @@ -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