Skip to content

Slint + async Rust = ? #4377

Answered by ogoffart
Tmpod asked this question in Q&A
Jan 18, 2024 · 5 comments · 17 replies
Discussion options

You must be logged in to vote

For async, Slint can run future in the UI thread with the slint::spawn_local function.
With that function you can spawn future and call async function from a callback handler, for example.

You can also run other async executor (eg, tokio) on another thread. It is fairly easy to call back into the ui thread with slint::invoke_from_event_loop.

Replies: 5 comments 17 replies

Comment options

You must be logged in to vote
1 reply
@Tmpod
Comment options

Comment options

You must be logged in to vote
15 replies
@Tmpod
Comment options

@bjorn
Comment options

@Tmpod
Comment options

@Tmpod
Comment options

@Tmpod
Comment options

Answer selected by Tmpod
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Tmpod
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants