diff --git a/flutter_ffi_plugin/CHANGELOG.md b/flutter_ffi_plugin/CHANGELOG.md new file mode 100644 index 00000000..5298a9ab --- /dev/null +++ b/flutter_ffi_plugin/CHANGELOG.md @@ -0,0 +1,568 @@ +## 4.12.2 + +- Fixed guide badges. + +## 4.12.1 + +- Fixed publishing issues. + +## 4.12.0 + +- Renamed the framework to Rinf. + +## 4.11.8 + +- Improved first guides. + +## 4.11.7 + +- Improved the example app's code and guides. + +## 4.11.6 + +- Improved the shorthand command crate. + +## 4.11.5 + +- Improved the shorthand command crate. + +## 4.11.4 + +- Improved the first preview image and some comments. + +## 4.11.3 + +- Improved the example app's code. + +## 4.11.2 + +- Fixed a problem with compilation on macOS. + +## 4.11.1 + +- Fixed a problem with compilation on macOS. + +## 4.11.0 + +- New Dart function `ensureFinalized()`. This function ensures that all Rust tasks are terminated. Take a look at the example code to understand how to run this function before closing the Flutter app. Note that you have to run `rifs template --bridge` again to use this function. + +## 4.10.0 + +- New default web alias `spawn_blocking()`. CPU-intensive blocking tasks are better to be executed on a separate thread pool. +- Improved the example app's performance and debug tests. + +## 4.9.0 + +- New default web alias `yield_now()`. Inside a long-running code, calling this will help you avoid blocking the whole async event loop, by giving the flow back to other async tasks. +- Vastly improved comments inside the `web_alias` Rust module. +- Now Rust panics on the web will be printed to the CLI too. +- Improved the example app's performance and debug tests. + +## 4.8.2 + +- Improved guide sentences. + +## 4.8.1 + +- Improved the readability of the example code. +- Organized and clarified first guides. + +## 4.8.0 + +- Now by running `rifs template --bridge`, you can apply and update only the `bridge` module inside the `hub` crate. This is useful when you've upgraded RIF but do not need to apply the whole template again. +- Improved `rifs --help` output. + +## 4.7.0 + +- Now Rust stacktrace will be printed to the CLI when a panic occurs. The changes are mostly included in the template, so make sure you've run `rifs template` on this new version. + +## 4.6.2 + +- Polished various aspects. + +## 4.6.1 + +- Stabilized `debug_print!` logic. + +## 4.6.0 + +- New `debug_print!` macro that works on all environments, including web and mobile emulators, with the power of Flutter debuggers. To use this, you need to run `rifs template` again. +- Now panic information in Rust will be properly printed to the CLI. Note that Rust panics don't crash the app and do not hinder stability. +- Improved docs. There are also more guides about well-known types in Protobuf. Thanks `@LucaCoduriV`! + +## 4.5.0 + +- Added support for external symbols on iOS and macOS. This is needed for some Rust crates that depend on Apple's system frameworks. + +## 4.4.2 + +- Updated docs and demo links. + +## 4.4.1 + +- Updated docs and demo links. + +## 4.4.0 + +- Improved various guides and comments. +- Fixed a bug that made the app crash when passing in an empty `Vec`. +- Fixed the formatting of Rust files. + +## 4.3.0 + +- Now `flutter run` will use `require-corp` value for `cross-origin-embedder-policy` HTTP header that works on all web browsers. + +## 4.2.1 + +- Fixed a bug with `RustResponse::default()`. + +## 4.2.0 + +- New command `rifs --help`. Thanks `@bookshiyi`! + +## 4.1.4 + +- Fixed a sentence in the guides. + +## 4.1.3 + +- Made `rifs message` command read `PUB_CACHE` enviornment variable if present. Thanks `@rabbitson87`! + +## 4.1.2 + +- Fixed `rifs template` command. + +## 4.1.1 + +- Added some guides to the shorthand crate. +- Removed an unneeded dependency from the shorthand crate. + +## 4.1.0 + +- Fixed `sleep()` on the web. +- Added demo link in the guides. + +## 4.0.3 + +- Fixed bugs with `rifs template` on Windows. +- Fixed outdated comments. +- Organized sample code. + +## 4.0.2 + +- Eliminated an unnecessary Dart dependency. + +## 4.0.1 + +- Eliminated an unnecessary Dart dependency. + +## 4.0.0 + +- Added support for sending large binaries between Dart and Rust. This is now possible by using the `blob` field in `RustRequest`, `RustResponse`, and `RustSignal`. Please make sure you've run `rifs template` before using this new version because the template has changed a little. +- Added support for nested message folders. +- Added support for Rust nightly. +- Eliminated unnecessary Dart dependencies. + +## 3.7.4 + +- Updated `cargokit`, the build connector between Flutter and Rust. + +## 3.7.3 + +- Fixed a bug with cargo. + +## 3.7.2 + +- Fixed a bug with cargo. + +## 3.7.1 + +- Organized descriptions and files. + +## 3.7.0 + +- Now this framework provides a shorthand command `rifs ...` which is equivalent to `dart run rust_in_flutter ...`. + +## 3.6.0 + +- Fixed a bug that prevents the app from running on Linux. +- Improved various texts exposed to developers for clarity. + +## 3.5.1 + +- Bumped `prost` version to avoid snake case related warnings. + +## 3.5.0 + +- Shortend some names that were unnecessarily long. + +## 3.4.5 + +- Import statements became shorter in Dart. + +## 3.4.4 + +- Cleaned up outdated dependencies in `Cargo.toml`. + +## 3.4.3 + +- Now `syntax` and `package` statements in `.proto` files should be handled automatically. + +## 3.4.2 + +- Now running `dart run rust_in_flutter message` verifies `package` statement in `.proto` files and mistakes are fixed automatically. + +## 3.4.1 + +- Now match statement is used for handling requests. This improves code readability. + +## 3.4.0 + +- Now each `.proto` file is treated as a Rust resource, which essentially becomes an API endpoint. + +## 3.3.0 + +- `RustResource` enum has been added to `interaction.proto`. Now the list of available Rust resources are managed by Protobuf, which makes the project less error-prone. This new system also has less runtime overhead because interactions are distinguished by simple integers, not strings. + +## 3.2.3 + +- Improved guides. + +## 3.2.2 + +- Organized guides. + +## 3.2.1 + +- Matched first guides with the docs. + +## 3.2.0 + +- Now when applying the Rust template with `dart run rust_in_flutter template`, `README.md` file will get a new section explaining about this framework. + +## 3.1.1 + +- Updated docs link. + +## 3.1.0 + +- Now there's a new Dart command `message`. Developers can now generate Dart and Rust message code from `.proto` files with `dart run rust_in_flutter message`. `build.rs` file that used to do this is removed. + +## 3.0.9 + +- Fixed a problem with pub.dev score. + +## 3.0.8 + +- Fixed a problem with pub.dev score. + +## 3.0.7 + +- Fixed a problem with pub.dev score. + +## 3.0.6 + +- Fixed a problem with pub.dev score. + +## 3.0.5 + +- Moved documentation to a dedicated website. +- Now `build.rs` will automatically modify PATH for `protoc-gen-dart`. +- Fixed an error appearing in Rust-analyzer's webassembly mode. + +## 3.0.4 + +- Polished template code. + +## 3.0.3 + +- Polished template code. + +## 3.0.2 + +- Polished guides, comments and template code. + +## 3.0.1 + +- Fixed and organized tutorials and comments. + +## 3.0.0 + +- Adopted Protobuf for message serialization. Now communication between Dart and Rust is much more type-safe and faster than before. Because the template has now changed, you need to run `dart run rust_in_flutter template` again when migrating from version 2. Thanks `@wheregmis` and `@bookshiyi`! + +## 2.9.0 + +- Removed `corrosion`. Now this package solely relies on `cargokit` and is much more slimmer. Thanks `@bookshiyi`! +- Removed unneeded files from pub.dev publication. + +## 2.8.5 + +- Fixed a problem with pub.dev score. + +## 2.8.4 + +- Fixed a problem with pub.dev score. + +## 2.8.3 + +- Wrote new catchphrase. + +## 2.8.2 + +- Updated links. + +## 2.8.1 + +- Updated links. + +## 2.8.0 + +- Removed unneeded dependencies. + +## 2.7.4 + +- Fixed CI badge showing rate limit error. + +## 2.7.3 + +- Fixed wrong guides. + +## 2.7.2 + +- Organized guides. + +## 2.7.1 + +- Organized guides. Thanks `@bookshiyi`! + +## 2.7.0 + +- Stabilized web-related Rust toolchain's auto-installation. Thanks `@bookshiyi`! + +## 2.6.0 + +- Applied continuous integration for checking builds and improving project stability. Thanks `@bookshiyi`! + +## 2.5.6 + +- Updated Cargokit. Thanks `@bookshiyi`! + +## 2.5.5 + +- Improved guides about HTTP headers. + +## 2.5.4 + +- Updated example code. + +## 2.5.3 + +- Improved guides and CLI messages. + +## 2.5.2 + +- Optimized web binary size. + +## 2.5.1 + +- Optimized web performance. + +## 2.5.0 + +- Now Rust logic will be restarted upon Dart's hot restart on the web too. +- CLI commands are shortened. + +## 2.4.0 + +- Fixed the problem with dangling threads from the `tokio` runtime remaining after closing the Flutter app. Even after the app window was closed, `tokio` threads were still running, resulting in becoming a background process without a window. Now the `tokio` runtime will properly be shut down. + +## 2.3.2 + +- Re-publishing due to `pub.dev`'s `[UNKNOWN PLATFORMS]` error. + +## 2.3.1 + +- Restored the benefits section in the first guide. + +## 2.3.0 + +- Improved Dart's hot restart process on native platforms. + +## 2.2.0 + +- Improved the procedure of building for the web. +- Simplfied unneeded complexities. + +## 2.1.2 + +- Improved web alias module. +- Fixed small things. + +## 2.1.1 + +- Optimized the bridge thread on native platforms. +- Updated many minor errors in the guides. +- Fixed a problem with import statement not being written in `./lib/main.dart` when applying Rust template. + +## 2.1.0 + +- Merged `frb_engine` crate into `hub`. +- Removed unneeded intermediate worker pools. +- Added `time` web alias import. +- Added many guides and comments. + +## 2.0.1 + +- Improved guides. +- Added `print!` web alias macro. +- Organized exposed Dart APIs. + +## 2.0.0 + +- Added web support. + +## 1.6.6 + +- Improved guides. +- Now, the template application command will check if the current directory is a Flutter project first. + +## 1.6.5 + +- Improved guides. + +## 1.6.4 + +- Organized guide sections. + +## 1.6.3 + +- Organized guide sections. + +## 1.6.2 + +- Filled in missing translations. + +## 1.6.1 + +- Slightly improved guide sections. + +## 1.6.0 + +- Added step-by-step guides. + +## 1.5.3 + +- Fixed some example app code. + +## 1.5.2 + +- Improved the readability of example app code. + +## 1.5.1 + +- Added Japanese translation. +- Fixed some sentences in Korean guides. + +## 1.5.0 + +- Now the Android NDK version that the Flutter SDK expects will be used, not the version specified by this package. +- Fixed a bug saying `IntoDart` trait is not implemented. + +## 1.4.1 + +- Improved various guides. + +## 1.4.0 + +- Filled in various guides to help developers understand the structure more easily. + +## 1.3.2 + +- Added Chinese guides. Thanks `@moluopro`! +- Added Korean guides. +- Added guides about build tool version issues. +- Added guides about library bundling. + +## 1.3.1 + +- Fixed a problem with Rust crate path detection on Android. + +## 1.3.0 + +- Changed the name of an exposed enum. Now `Operation` has changed to `RustOperation` so that it won't make confusions with other operations. All developers should update their code to match this new name, probably using the batch replace function in various IDEs. +- Updated code snippets. + +## 1.2.8 + +- Fixed small things. + +## 1.2.7 + +- Stabilized `main.dart` modifcation upon `dart run rust_in_flutter:apply_template`. + +## 1.2.6 + +- Hid the information regarding the compilation of connector crates to avoid confusion with actual crates. + +## 1.2.5 + +- Updated the guide about Android NDK version. + +## 1.2.4 + +- Updated many outdated comments and guides. +- Decreased the time spent on `ensureInitialized`. Also, `ensureInitialized()` is automatically inserted in `main.dart` when doing `dart run rust_in_flutter:apply_template` from now on. +- Various code improvements were applied. + +## 1.2.3 + +- Clarified template structure in guides. + +## 1.2.2 + +- Hide more Dart APIs that are not meant to be used outside. + +## 1.2.1 + +- Updated many comments. +- Fine-tuned the visibility of Dart APIs. +- Organized guides. + +## 1.2.0 + +- Made the Rust request handler more future-proof, taking potential web support into account. + +## 1.1.1 + +- Improved various guides to help understanding the features of this package. + +## 1.1.0 + +- Now this package is a Flutter FFI plugin without dummy native code. +- Improved guides + +## 1.0.4 + +- Fixed a problem with library bundling on Linux. +- Added comments. +- Added guides. +- Improved template application. + +## 1.0.3 + +- Included code snippets in guides. + +## 1.0.2 + +- Fixed typos. +- Organized inner code. + +## 1.0.1 + +- Enforced bundling on macOS and iOS. +- Improved pub score. +- Make `apply_rust` modify `.gitignore`. + +## 1.0.0 + +- Previously `flutter_rust_app_template`, now this is a small convenient framework that can be applied to existing Flutter projects. diff --git a/flutter_ffi_plugin/LICENSE b/flutter_ffi_plugin/LICENSE new file mode 100644 index 00000000..f69a0cf6 --- /dev/null +++ b/flutter_ffi_plugin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Cunarist + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/flutter_ffi_plugin/README.md b/flutter_ffi_plugin/README.md new file mode 100644 index 00000000..58962c34 --- /dev/null +++ b/flutter_ffi_plugin/README.md @@ -0,0 +1,66 @@ +# Rinf: Rust in Flutter + +[![Pub Version](https://img.shields.io/pub/v/rinf)](https://pub.dev/packages/rinf) +[![Pub Popularity](https://img.shields.io/pub/popularity/rust_in_flutter)](https://pub.dev/packages/rust_in_flutter) +[![Pub Points](https://img.shields.io/pub/points/rinf)](https://pub.dev/packages/rinf) +[![GitHub Stars](https://img.shields.io/github/stars/cunarist/rinf)](https://github.com/cunarist/rinf/stargazers) +[![Build Test](https://github.com/cunarist/rinf/actions/workflows/build_test.yaml/badge.svg)](https://github.com/cunarist/rinf/actions/workflows/build_test.yaml?query=branch%3Amain) +[![GitHub License](https://img.shields.io/github/license/cunarist/rinf)](https://github.com/cunarist/rinf/blob/main/LICENSE) + +**Rust as your Flutter backend, Flutter as your Rust frontend** + +![Preview](https://github.com/cunarist/rinf/assets/66480156/ae82aad9-02f9-4a1e-93f9-69907511baf8) + +This is a production-ready framework for creating beautiful and performant cross-platform apps using Flutter and Rust with batteries fully included. Simply add this framework to your app project, and you're all set to write Flutter and Rust together! + +## 🎮 Demo + +Visit the [demo](https://rinf-demo.cunarist.com/) running on the web to experience the smoothness and delightfulness that comes from the combination of Flutter and Rust. You can also dive into the [example code](https://github.com/cunarist/rinf/tree/main/flutter_ffi_plugin/example). + +## 🖥️ Platform Support + +All platforms available with Flutter are [tested](https://github.com/cunarist/rinf/actions/workflows/build_test.yaml?query=branch%3Amain) and supported. Challenging build settings are automatically handled by this framework. + +- ✅ Linux: Tested and supported +- ✅ Android: Tested and supported +- ✅ Windows: Tested and supported +- ✅ macOS: Tested and supported +- ✅ iOS: Tested and supported +- ✅ Web: Tested and supported + +## 🎁 Benefits + +- **Truly easy**: It only takes about about a minute or two to fully setup your app. No other solution provides this level of convenience. +- **Minimal**: This is not a bulky framework that requires you to install so many dependencies and use complicated CLI commands. Just focus on your code using your preferred Flutter and Rust libraries. +- **High-level interface**: No messing with sensitive build files, no concerns about memory safety. Stay with Dart and Rust that you're familiar with. +- **Low-level control**: Though the hard things are kept beneath the surface, you are free to modify the underlying logic such as concurrency or debugging features. There is no hidden mechanism that prevents your understanding. +- **Well maintained**: Our [automated workflows](https://github.com/cunarist/rinf/actions) including build tests are always kept passing, thanks to the main branch protection rule. Also, the number of external dependencies is kept as low as possible and documentations are thoughtfully organized. +- **Efficient**: No memory copy when sending native data, no hidden threads and web workers with memory overhead. This is a really thin wrapper around Dart and Rust. +- **Scalable**: You are able to use an arbitrary number of Rust library crates as you want, perhaps including ones that you've already been working on. +- **Logical API**: You declare RESTful messages, not functions for APIs, which provides greater stability. Requesting from Dart and responsing from Rust, as well as streaming from Rust to Dart is possible. Messages are type-safe and flexible because it's powered by the well-known [Protobuf](https://protobuf.dev/) serialization. You also have the ability to send large binary data from Rust to Dart without any memory copy. +- **File-based messages**: No more headaches from extremely big API code files that hinders readability. Even defining hundereds and thousands of API endpoints between Dart and Rust is easy and clean. +- **Async interaction**: Rust operations will never block Flutter's main thread because they are spawned in a separate thread pool. +- **Convenient debugging**: All the debugging functionalities are provided by default, without the need for dealing with browsers or mobile emulators. Also, the whole Rust logic is automatically restarted on Dart's hot restart. +- **Reliable**: This framework simply provides a connection between Dart and Rust without complex code generation mechanism. Each component is backed by big communities, which is especially important for ensuring safety. + +## 🐦 Why Use Flutter? + +While Rust is a powerful language for high-performance native programming, its ecosystem for building graphical user interfaces is far from being mature. Though Rust already has some GUI frameworks, they don't compete with extensive support and smooth development experience that Flutter provides. It's only Flutter that compiles to all 6 major platforms from a single codebase. + +Flutter is a powerful and versatile framework that has gained immense popularity for building cross-platform applications with stunning user interfaces. It provides declarative pattern, beautiful widgets, hot reload, convenient debugging tools, and dedicated packages for user interfaces right out-of-the-box. + +## 🦀 Why Use Rust? + +While Dart excels as an amazing object-oriented language for GUI apps, its non-native garbage collection may not always meet demanding performance requirements, and it may lack advanced data manipulation packages. This is where Rust steps in, offering an incredible speed advantage of roughly [2~40 times faster](https://programming-language-benchmarks.vercel.app/dart-vs-rust) than Dart, alongside the ability to leverage multiple threads and various crates that get the job done. + +Rust has garnered a devoted following, being [the most loved programming language](https://survey.stackoverflow.co/2022#section-most-loved-dreaded-and-wanted-programming-scripting-and-markup-languages) on Stack Overflow. Its native performance, thanks to the zero-cost abstraction philosophy, ensures high productivity. Many developers foresee Rust potentially replacing C++ in the future. Rust's simplicity, memory safety, superior performance in various scenarios, vibrant community, and robust tooling support contribute to its growing popularity. + +## 📖 Documentation + +Check out the [documentation](https://rinf-docs.cunarist.com) for everything you need to know about how to use this thing. + +## 👥 Contributors + +We appreciate your contribution to the development of this project! We're always open to discussions and pull requests, so please do not hesitate to leave your ideas or opinions at our GitHub repository. + +[![GitHub contributors](https://contrib.rocks/image?repo=cunarist/rinf)](https://github.com/cunarist/rinf/graphs/contributors) diff --git a/rust_crate/README.md b/rust_crate/README.md new file mode 100644 index 00000000..58962c34 --- /dev/null +++ b/rust_crate/README.md @@ -0,0 +1,66 @@ +# Rinf: Rust in Flutter + +[![Pub Version](https://img.shields.io/pub/v/rinf)](https://pub.dev/packages/rinf) +[![Pub Popularity](https://img.shields.io/pub/popularity/rust_in_flutter)](https://pub.dev/packages/rust_in_flutter) +[![Pub Points](https://img.shields.io/pub/points/rinf)](https://pub.dev/packages/rinf) +[![GitHub Stars](https://img.shields.io/github/stars/cunarist/rinf)](https://github.com/cunarist/rinf/stargazers) +[![Build Test](https://github.com/cunarist/rinf/actions/workflows/build_test.yaml/badge.svg)](https://github.com/cunarist/rinf/actions/workflows/build_test.yaml?query=branch%3Amain) +[![GitHub License](https://img.shields.io/github/license/cunarist/rinf)](https://github.com/cunarist/rinf/blob/main/LICENSE) + +**Rust as your Flutter backend, Flutter as your Rust frontend** + +![Preview](https://github.com/cunarist/rinf/assets/66480156/ae82aad9-02f9-4a1e-93f9-69907511baf8) + +This is a production-ready framework for creating beautiful and performant cross-platform apps using Flutter and Rust with batteries fully included. Simply add this framework to your app project, and you're all set to write Flutter and Rust together! + +## 🎮 Demo + +Visit the [demo](https://rinf-demo.cunarist.com/) running on the web to experience the smoothness and delightfulness that comes from the combination of Flutter and Rust. You can also dive into the [example code](https://github.com/cunarist/rinf/tree/main/flutter_ffi_plugin/example). + +## 🖥️ Platform Support + +All platforms available with Flutter are [tested](https://github.com/cunarist/rinf/actions/workflows/build_test.yaml?query=branch%3Amain) and supported. Challenging build settings are automatically handled by this framework. + +- ✅ Linux: Tested and supported +- ✅ Android: Tested and supported +- ✅ Windows: Tested and supported +- ✅ macOS: Tested and supported +- ✅ iOS: Tested and supported +- ✅ Web: Tested and supported + +## 🎁 Benefits + +- **Truly easy**: It only takes about about a minute or two to fully setup your app. No other solution provides this level of convenience. +- **Minimal**: This is not a bulky framework that requires you to install so many dependencies and use complicated CLI commands. Just focus on your code using your preferred Flutter and Rust libraries. +- **High-level interface**: No messing with sensitive build files, no concerns about memory safety. Stay with Dart and Rust that you're familiar with. +- **Low-level control**: Though the hard things are kept beneath the surface, you are free to modify the underlying logic such as concurrency or debugging features. There is no hidden mechanism that prevents your understanding. +- **Well maintained**: Our [automated workflows](https://github.com/cunarist/rinf/actions) including build tests are always kept passing, thanks to the main branch protection rule. Also, the number of external dependencies is kept as low as possible and documentations are thoughtfully organized. +- **Efficient**: No memory copy when sending native data, no hidden threads and web workers with memory overhead. This is a really thin wrapper around Dart and Rust. +- **Scalable**: You are able to use an arbitrary number of Rust library crates as you want, perhaps including ones that you've already been working on. +- **Logical API**: You declare RESTful messages, not functions for APIs, which provides greater stability. Requesting from Dart and responsing from Rust, as well as streaming from Rust to Dart is possible. Messages are type-safe and flexible because it's powered by the well-known [Protobuf](https://protobuf.dev/) serialization. You also have the ability to send large binary data from Rust to Dart without any memory copy. +- **File-based messages**: No more headaches from extremely big API code files that hinders readability. Even defining hundereds and thousands of API endpoints between Dart and Rust is easy and clean. +- **Async interaction**: Rust operations will never block Flutter's main thread because they are spawned in a separate thread pool. +- **Convenient debugging**: All the debugging functionalities are provided by default, without the need for dealing with browsers or mobile emulators. Also, the whole Rust logic is automatically restarted on Dart's hot restart. +- **Reliable**: This framework simply provides a connection between Dart and Rust without complex code generation mechanism. Each component is backed by big communities, which is especially important for ensuring safety. + +## 🐦 Why Use Flutter? + +While Rust is a powerful language for high-performance native programming, its ecosystem for building graphical user interfaces is far from being mature. Though Rust already has some GUI frameworks, they don't compete with extensive support and smooth development experience that Flutter provides. It's only Flutter that compiles to all 6 major platforms from a single codebase. + +Flutter is a powerful and versatile framework that has gained immense popularity for building cross-platform applications with stunning user interfaces. It provides declarative pattern, beautiful widgets, hot reload, convenient debugging tools, and dedicated packages for user interfaces right out-of-the-box. + +## 🦀 Why Use Rust? + +While Dart excels as an amazing object-oriented language for GUI apps, its non-native garbage collection may not always meet demanding performance requirements, and it may lack advanced data manipulation packages. This is where Rust steps in, offering an incredible speed advantage of roughly [2~40 times faster](https://programming-language-benchmarks.vercel.app/dart-vs-rust) than Dart, alongside the ability to leverage multiple threads and various crates that get the job done. + +Rust has garnered a devoted following, being [the most loved programming language](https://survey.stackoverflow.co/2022#section-most-loved-dreaded-and-wanted-programming-scripting-and-markup-languages) on Stack Overflow. Its native performance, thanks to the zero-cost abstraction philosophy, ensures high productivity. Many developers foresee Rust potentially replacing C++ in the future. Rust's simplicity, memory safety, superior performance in various scenarios, vibrant community, and robust tooling support contribute to its growing popularity. + +## 📖 Documentation + +Check out the [documentation](https://rinf-docs.cunarist.com) for everything you need to know about how to use this thing. + +## 👥 Contributors + +We appreciate your contribution to the development of this project! We're always open to discussions and pull requests, so please do not hesitate to leave your ideas or opinions at our GitHub repository. + +[![GitHub contributors](https://contrib.rocks/image?repo=cunarist/rinf)](https://github.com/cunarist/rinf/graphs/contributors)