The following is a rough outline how messaging could work between the Tauri Rust backend, the frontend webview, and the kernel runtime.
Within this example we're going to assume the kernel is already alive and nothing else is queued or busy.
- The Notebook Frontend
invoke
sexecute_cell
by ID. - The Tauri Core Backend receives this message, uniquely determines which notebook to work with, and dispatches to the notebook service.
- The Notebook service creates an
execute_request
which starts running the cell. The , indicated by "Cell running," and sends a confirmation response back to the Tauri Core Backend. - The Tauri Core Backend sends a Tauri IPC Response back to the Notebook Frontend as a confirmation.
- As the cell executes and produces output, the Notebook Backend sends events about the state of the notebook application include cell state (queued, busy, etc.) as well as output back to the Tauri Core Backend.
- The Tauri Core Backend forwards these events to the Notebook Frontend.
- Once the cell execution is finished, the Notebook Backend sends a "Cell finished" event to the Tauri Core Backend, which then sends an event to the Notebook Frontend to update the cell state.