fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.

Home Page:https://fzyzcjy.github.io/flutter_rust_bridge/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiple isolates in flutter

ggslayer opened this issue · comments

Hi, when I create a new isolate in flutter, call rust api in the new isolate, the error report: "flutter_rust_bridge has not been initialized. Did you forget to call await RustLib.init();?".

So, I have two question:

  1. does RustLib.init must be called in every isolate?
  2. if multiple isolate, the rust lib will exists multiple instance or one instance shared by multiple isolate?

thank you