Member-only story

Frontend Backend Communication in Tauri: Implementing Progress Bars and Interrupt Button

Simplifying asynchronous communication

applied.math.coding
Better Programming
Published in
3 min readOct 21, 2022

In this short story, I want to provide a quick glance at how Tauri supports asynchronous communication between the front end and back end. Features like these are typically needed when the back-end informs the UI about changes like progress messages of a long-running task or changes of state that the UI is affected by. We will see, as usually to Tauri, our goal is not hard to achieve. Tauri provides very easy-to-use utilities around asynchronous messaging based on its Window-API.

For those who are not familiar with Tauri or Rust and want to have a quick wrap-up, I suggest looking at here and here.

Sending from the back end

Assume at the front-end we have some component that triggers to run a long-running task by invocation of a Tauri command. The task could send periodically updates on its progress status and send this to the client as an Event. The client in return could, for…

applied.math.coding
applied.math.coding

Written by applied.math.coding

I am a Software Developer - Java, Rust, SQL, TypeScript - with strong interest doing research in pure and applied Mathematics.

No responses yet

Write a response