Crates.io | rinf |
lib.rs | rinf |
version | 8.7.2 |
created_at | 2023-10-17 17:36:27.41379+00 |
updated_at | 2025-08-03 13:41:07.586451+00 |
description | Rust for native business logic, Flutter for flexible and beautiful GUI |
homepage | |
repository | https://github.com/cunarist/rinf |
max_upload_size | |
id | 1005978 |
size | 60,894 |
Rust for native business logic, Flutter for flexible and beautiful GUI
Rinf is a framework for creating beautiful and performant cross-platform Rust apps by using Flutter as the UI layer. Simply add this framework to your app project, and you're all set to write Rust within Flutter!
Visit the documentation to learn everything about using this framework. You can also explore the example code.
All platforms available with Flutter are tested and supported. Challenging build settings are automatically handled by this framework.
Below is Rust code with business logic, and following that is Dart code with widgets.
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
StreamBuilder(
stream: MyMessage.rustSignalStream,
builder: (context, snapshot) {
final signalPack = snapshot.data;
if (signalPack == null) {
return Text('Nothing received yet');
}
final myMessage = signalPack.message;
return Text(myMessage.currentNumber.toString());
},
)
Messaging from Dart to Rust is also possible in a similar manner.
All Dart classes are generated by Rinf in a type-safe way. You can define the message schema by using the derivable traits in Rust.
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 compare to the extensive support and smooth development experience that Flutter provides. Flutter is the only framework that compiles to all six 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 a declarative pattern, beautiful widgets, hot reload, convenient debugging tools, and dedicated packages for user interfaces right out of the box.
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 a remarkable speed advantage of up to 40 times faster 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 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.
If Rinf has been helpful, please consider giving a star to our GitHub repository and a like to our Pub package. You can also support us by spreading the word and sharing this framework online.
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 share your ideas or opinions on our GitHub repository.