Desdaemon / flutter_rust_bridge_template

Template for Flutter + Rust integration with flutter_rust_bridge.
https://desdaemon.github.io/flutter_rust_bridge_template/
Apache License 2.0
120 stars 63 forks source link

[question] Is it possible to change rust code and hot reload the app? #36

Closed onichandame closed 1 year ago

onichandame commented 1 year ago

I want to put most of the business logic in the native code. So most changes happen in the rust side. It would greatly reduce the overhead of change-build-test loop if the debug app is automatically hot reloaded when the rust code is changed. Is it possible to achieve this? Sorry to ask before trying myself because I am very noob on flutter.

Desdaemon commented 1 year ago

Short answer is not in the near future. Unlike Dart, Rust does not have any built-in mechanism for hot-reloading, and the few experiments that exist in this space right now are very complicated. I recommend reading this blog post from fasterthanlime if you want to take a glimpse of what's needed to bring hot-reload to Rust.

onichandame commented 1 year ago

Thanks! The source is very helpful