- Optimized certain async APIs in the
rinf
crate for better performance.
- The initial template and example code has been improved.
- To migrate from Rinf version 6, please refer to this section in the documentation.
- Rinf no longer relies on
tokio
. While it is provided by default in the template, you can now choose whichever async runtime you prefer. - The CLI output is now more compact and includes animations.
- The full
flutter run
command with the necessary arguments can now be obtained by runningrinf server
. - It is now recommended to import compiled message classes and structs from the root messages module.
- Memory copying for messages sent from Dart to Rust has been reduced. This was achieved using Dart's FFI feature called 'leaf calls.'
- This is a beta version.
- This is an alpha version.
- Now it's possible to add attributes to generated message structs in Rust. Thanks @H2Sxxa!
- Now, the message channels work after reopening the app following the use of the back button on mobile devices.
- The return type of Rust's
main
function can now be anything. - Fixed the issue causing the app to hang on the splash screen after closing it with the back button on Android.
- New feature
bevy
for treating Dart signals as Bevy events was added. Thanks @Deep-co-de!
- The
get_dart_signal_receiver
function now returnsResult
. You need to useunwrap
or?
to retrieve Dart signal receivers from the generated message structs. - You now need to manually provide the generated
assignRustSignal
to theinitializeRust
function, which can be imported usingimport 'package:rinf/rinf.dart';
in Dart. - The tokio runtime will now default to being single-threaded. To use a multi-threaded tokio runtime, enable the new
rt-multi-thread
crate feature. - By default, backtraces will be hidden in the CLI, with only the error message being printed. To display the Rust backtrace, enable the new
backtrace
crate feature.
- Fixed linefeed problem in published files.
- Generated message channels are now more efficient.
- Minimum Android SDK version increased from 16 to 21. Thanks @debanjanbasu!
- The
finalizeRust()
function in Dart has been removed. Thetokio
async runtime, which holds Rust logic, still drops automatically when the app ends. - Bumped
prost
version to 0.12.6. Thanks @yeoupooh! - Internal code has been organized.
- Fixed a bug with Dart's extension methods in the generated message code.
- Now it's possible to set the dynamic library's path.
- Now
rinf message
generates more memory-efficient and cleaner code.
- Early Dart signals are now stored in the tokio channel instead of being ignored. Their performance is also slightly better.
- Excessive sample code is not included in the template from the
rinf template
command anymore. - Now
tokio
is enabled by default in the template, nottokio_with_wasm
. - A configuration option,
rinf.message.rust_serde
, was added to make generated Rust message files compatible withserde
. Thanks @NeoVance!
- Early Dart signals have become more stable.
- Now the memory allocation and drop is done in each language.
- This version supports Flutter 3.22.
- The new version of Flutter has a little different way of resolving paths. This release adapts to this change.
- Now
sendSignalToRust
andsend_signal_to_dart
methods no longer requirenull
orNone
, making the API much cleaner. To make them include binary data, write[RINF:DART-SIGNAL-BINARY]
or[RINF:RUST-SIGNAL-BINARY]
in Protobuf files. - The problem of panicking from null pointers that arise from empty signal data has been fixed.
- Allowed
enum
andoneof
statements to work in Protobuf message files. Thanks @yeoupooh!
- Fixed a linting issue. Thanks @romanseo1!
- Updated
tokio_with_wasm
to a newer version that addresses performance issues withspawn_blocking
. - Added example code that shows how to use global state in
sample_functions.rs
file.
- Added support for some Linux distributions where patching Flutter SDK is not possible.
- Fixed a problem with the web sector not working. To use this new version, it's recommended to discard all Git changes in Flutter SDK's directory, or simply run
flutter upgrade --force
. - Fixed a problem with
cd
error on Windows. Thanks @H2Sxxa! - Fixed
pub.dev
package score.
- Now early Rust signals on startup works properly, even if the widgets are not built yet.
rustSignalStream
will remember Rust signals that were received before widgets were built, and give them to the first listener.
- Now the native library file is loaded as dynamic library, not static library, on iOS and macOS, like other platforms. This reduces the possibility of potential conflicts of native symbols.
- Now
rinf template
checkspubspec.yaml
instead oflib/main.dart
to ensure that the current folder is a Flutter project.
- The start and stop mechanism of Rust has become more stable.
- Fixed a small glitch with codegen.
- The interface code has been organized. Now the
bridge
Rust module is gone and the API makes more sense. Please refer to the example code to upgrade.
- Now custom installation of
protoc
works. This is useful when you don't have full access to GitHub APIs, which is needed for automaticprotoc
installation. Thanks @TENX-S! - Signal handling has become more efficient.
- Now
rustSignalStream
slisten
can be called multiple times. Thanks @rabbitson87!
- Improved CLI output texts.
js
Dart package was removed.
- You need to run
rinf template
,cargo install rinf
again to use this new version. - Now the communication between Dart and Rust is much simpler. You can mark messages in
.proto
files so that Rinf's code generator can generate channels in-between. This new system is not compatible with older Rinf versions, so please check the docs before you upgrade. - Added the ability to customize Rinf's behaviors by writing fields inside
pubspec.yaml
file. Thanks @thlorenz! - Allowed users to check when the documentation page was made and edited. Thanks @VictorieeMan!
- Now it's possible to quit
rinf message --watch
by pressingq
on your keyboard. - Internal code has been organized.
- This is a beta version.
- This is an alpha version.
- Now users do not have to manually install
protoc
binary executable anymore. Protobuf compiler is now automatically installed. Note that you need to runcargo install rinf
again to use this new version.
- Fixed a bug with
rinf message
that omitsmod.rs
inside a folder without any message.
- Now it is possible to use
import
statements in.proto
files. - Now you can properly use Flutter's hot restart while developing.
- Tutorials and guides are improved.
- Fixed a bug with
rinf message
, that might fail if some of the folders are empty.
- Unnecessary memory copy is now avoided.
- Fixed introductions.
- Fixed a bug with memory freeing.
- The codebase was organized further.
- Fixed a problem with Dart analysis.
- All the code from
flutter_rust_bridge
was removed. This was due to criticisms about Rinf from the community and FRB devs. Also, internal bridge and FFI code is now much smaller. User API remains unchanged.
- Now
requestToRust
Dart function will returnnull
when the handler function in Rust cannot respond or has panicked. This is a breaking change, so when you upgrade to this version, you need to runrinf template --bridge
in the terminal and refactor some of the code where IDE warns you about mismatches. You also need to modifylib.rs
andwith_request.rs
modules of thehub
crate. Also, thetimeout
parameter was removed from therequestToRust
function because Dart will always get some return value from Rust in all cases. Please refer to the example code and documentation tutorials if you need detailed information.
- Added support for Android Gradle Plugin 8.
- Switched to the new official website
rinf.cunarist.com
.
- The mechanism for awaiting Rust's responses from Dart has become much more efficient.
- Now
null
can be provided to thetimeout
parameter in therequestToRust()
Dart function. This enables awaiting a Rust response forever, but it should be used cautiously because it may potentially lead to resource leaks.
- Now
rinf message --watch
works on all platforms. Thanks @bookshiyi!
- New command
rinf message --watch
for automatic message code generation. Thanks @bookshiyi!
- Updated package descriptions.
- Improved guides to avoid misconceptions about the communication system. Rinf only uses FFI without any web server.
- Fixed the broken
rinf template --bridge
command
- Vastly organized files, dependencies, and code readability. Now the
hub
crate is much cleaner than before. If you already have an app using older Rinf versions, it is recommended to runrinf template --bridge
and addrinf = "4.16.0"
toCargo.toml
of thehub
crate.
- Now the web API fetching example uses
http
instead ofhttps
in the example app.
- Now the
reqwest
crate will be disabled when compiling the example app for Android.
- Allowed setting custom timeout when using
requestToRust()
. Thanks @cipherchabon!
- Added a web API fetching example to the template.
- Fixed various things such as template comments, code linting issues.
- Fixed small things.
- Fixed formatting issues in Dart code.
- Improved the template code by disabling CPU-intensive tasks and removing unneeded dependency features.
- Improved CLI outputs from
rinf wasm
. - Improved various guides and template comments.
- Automated publication.
- Fixed permission related problems with build script files.
- Fixed permission related problems with build script files.
- Fixed guide badges.
- Fixed publishing issues.
- Renamed the framework to Rinf.
- Improved first guides.
- Improved the example app's code and guides.
- Improved the shorthand command crate.
- Improved the shorthand command crate.
- Improved the first preview image and some comments.
- Improved the example app's code.
- Fixed a problem with compilation on macOS.
- Fixed a problem with compilation on macOS.
- 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 runrifs template --bridge
again to use this function.
- 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.
- 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.
- Improved guide sentences.
- Improved the readability of the example code.
- Organized and clarified first guides.
- Now by running
rifs template --bridge
, you can apply and update only thebridge
module inside thehub
crate. This is useful when you've upgraded RIF but do not need to apply the whole template again. - Improved
rifs --help
output.
- 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.
- Polished various aspects.
- Stabilized
debug_print!
logic.
- 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 runrifs 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!
- Added support for external symbols on iOS and macOS. This is needed for some Rust crates that depend on Apple's system frameworks.
- Updated docs and demo links.
- Updated docs and demo links.
- Improved various guides and comments.
- Fixed a bug that made the app crash when passing in an empty
Vec<u8>
. - Fixed the formatting of Rust files.
- Now
flutter run
will userequire-corp
value forcross-origin-embedder-policy
HTTP header that works on all web browsers.
- Fixed a bug with
RustResponse::default()
.
- New command
rifs --help
. Thanks @bookshiyi!
- Fixed a sentence in the guides.
- Made
rifs message
command readPUB_CACHE
enviornment variable if present. Thanks @rabbitson87!
- Fixed
rifs template
command.
- Added some guides to the shorthand crate.
- Removed an unneeded dependency from the shorthand crate.
- Fixed
sleep()
on the web. - Added demo link in the guides.
- Fixed bugs with
rifs template
on Windows. - Fixed outdated comments.
- Organized sample code.
- Eliminated an unnecessary Dart dependency.
- Eliminated an unnecessary Dart dependency.
- Added support for sending large binaries between Dart and Rust. This is now possible by using the
blob
field inRustRequest
,RustResponse
, andRustSignal
. Please make sure you've runrifs 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.
- Updated
cargokit
, the build connector between Flutter and Rust.
- Fixed a bug with cargo.
- Fixed a bug with cargo.
- Organized descriptions and files.
- Now this framework provides a shorthand command
rifs ...
which is equivalent todart run rust_in_flutter ...
.
- Fixed a bug that prevents the app from running on Linux.
- Improved various texts exposed to developers for clarity.
- Bumped
prost
version to avoid snake case related warnings.
- Shortend some names that were unnecessarily long.
- Import statements became shorter in Dart.
- Cleaned up outdated dependencies in
Cargo.toml
.
- Now
syntax
andpackage
statements in.proto
files should be handled automatically.
- Now running
dart run rust_in_flutter message
verifiespackage
statement in.proto
files and mistakes are fixed automatically.
- Now match statement is used for handling requests. This improves code readability.
- Now each
.proto
file is treated as a Rust resource, which essentially becomes an API endpoint.
RustResource
enum has been added tointeraction.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.
- Improved guides.
- Organized guides.
- Matched first guides with the docs.
- 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.
- Updated docs link.
- Now there's a new Dart command
message
. Developers can now generate Dart and Rust message code from.proto
files withdart run rust_in_flutter message
.build.rs
file that used to do this is removed.
- Fixed a problem with pub.dev score.
- Fixed a problem with pub.dev score.
- Fixed a problem with pub.dev score.
- Fixed a problem with pub.dev score.
- Moved documentation to a dedicated website.
- Now
build.rs
will automatically modify PATH forprotoc-gen-dart
. - Fixed an error appearing in Rust-analyzer's webassembly mode.
- Polished template code.
- Polished template code.
- Polished guides, comments and template code.
- Fixed and organized tutorials and comments.
- 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!
- Removed
corrosion
. Now this package solely relies oncargokit
and is much more slimmer. Thanks @bookshiyi! - Removed unneeded files from pub.dev publication.
- Fixed a problem with pub.dev score.
- Fixed a problem with pub.dev score.
- Wrote new catchphrase.
- Updated links.
- Updated links.
- Removed unneeded dependencies.
- Fixed CI badge showing rate limit error.
- Fixed wrong guides.
- Organized guides.
- Organized guides. Thanks @bookshiyi!
- Stabilized web-related Rust toolchain's auto-installation. Thanks @bookshiyi!
- Applied continuous integration for checking builds and improving project stability. Thanks @bookshiyi!
- Updated Cargokit. Thanks @bookshiyi!
- Improved guides about HTTP headers.
- Updated example code.
- Improved guides and CLI messages.
- Optimized web binary size.
- Optimized web performance.
- Now Rust logic will be restarted upon Dart's hot restart on the web too.
- CLI commands are shortened.
- 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 thetokio
runtime will properly be shut down.
- Re-publishing due to
pub.dev
's[UNKNOWN PLATFORMS]
error.
- Restored the benefits section in the first guide.
- Improved Dart's hot restart process on native platforms.
- Improved the procedure of building for the web.
- Simplfied unneeded complexities.
- Improved web alias module.
- Fixed small things.
- 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.
- Merged
frb_engine
crate intohub
. - Removed unneeded intermediate worker pools.
- Added
time
web alias import. - Added many guides and comments.
- Improved guides.
- Added
print!
web alias macro. - Organized exposed Dart APIs.
- Added web support.
- Improved guides.
- Now, the template application command will check if the current directory is a Flutter project first.
- Improved guides.
- Organized guide sections.
- Organized guide sections.
- Filled in missing translations.
- Slightly improved guide sections.
- Added step-by-step guides.
- Fixed some example app code.
- Improved the readability of example app code.
- Added Japanese translation.
- Fixed some sentences in Korean guides.
- 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.
- Improved various guides.
- Filled in various guides to help developers understand the structure more easily.
- Added Chinese guides. Thanks @moluopro!
- Added Korean guides.
- Added guides about build tool version issues.
- Added guides about library bundling.
- Fixed a problem with Rust crate path detection on Android.
- Changed the name of an exposed enum. Now
Operation
has changed toRustOperation
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.
- Fixed small things.
- Stabilized
main.dart
modifcation upondart run rust_in_flutter:apply_template
.
- Hid the information regarding the compilation of connector crates to avoid confusion with actual crates.
- Updated the guide about Android NDK version.
- Updated many outdated comments and guides.
- Decreased the time spent on
ensureInitialized
. Also,ensureInitialized()
is automatically inserted inmain.dart
when doingdart run rust_in_flutter:apply_template
from now on. - Various code improvements were applied.
- Clarified template structure in guides.
- Hide more Dart APIs that are not meant to be used outside.
- Updated many comments.
- Fine-tuned the visibility of Dart APIs.
- Organized guides.
- Made the Rust request handler more future-proof, taking potential web support into account.
- Improved various guides to help understanding the features of this package.
- Now this package is a Flutter FFI plugin without dummy native code.
- Improved guides
- Fixed a problem with library bundling on Linux.
- Added comments.
- Added guides.
- Improved template application.
- Included code snippets in guides.
- Fixed typos.
- Organized inner code.
- Enforced bundling on macOS and iOS.
- Improved pub score.
- Make
apply_rust
modify.gitignore
.
- Previously
flutter_rust_app_template
, now this is a small convenient framework that can be applied to existing Flutter projects.