Skip to content

How to correctly call Dart functions from Rust? #1489

Answered by fzyzcjy
xiaohucode asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm, looks like your code is not UnwindSafe. Maybe:

  1. Use AssertUnwindSafe everywhere to tell compiler, even if it may be not unwindsafe, you do not care and is happy (I personally do not care in my app, but leave this to the users since I do not know whether the users care)
  2. Or, make a PR to automatically generate AssertUnwindSafe, such that you do not need to manually wrap with AssertUnwindSafe. (If someone really wants the compiler hint of unwind-not-safe, maybe we can additionally add a flag for this behavior; but that is another story)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xiaohucode
Comment options

@fzyzcjy
Comment options

Answer selected by xiaohucode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants