Skip to content

Emit change to frontend from rust?! #7558

Answered by FabianLars
FrankLaterza asked this question in Q&A
Discussion options

You must be logged in to vote

but this seems to only be a solution for the setup only

Well, not reallyyy. All you need is access to an AppHandle or Window instance (which you can get from the setup hook, all the event handlers, and tauri commands). If for some reason you can't move an AppHandle into the tokio thread you could look into a OnceCell (part of the latest rust version or the once_cell crate) to make a global-ish AppHandle.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by FrankLaterza
Comment options

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

@FabianLars
Comment options

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