Build a cross-platform native webview-based window with Rust using the same library that built the Tauri framework. #3529
Replies: 12 comments 13 replies
-
A major pain-point for NiceGUI's pywebview integration is that it is not async. It would be great to have a native window library with asyncio support so we could directly integrate it instead of using the current (incomplete) wrapping. |
Beta Was this translation helpful? Give feedback.
-
Will it be a problem for NiceGUI if the communication between Webview and Python is done via TCP and IPC (stdin/stdout)? |
Beta Was this translation helpful? Give feedback.
-
Communication example between rust and pythonbbbb.mp4 |
Beta Was this translation helpful? Give feedback.
-
As long as there is a proper Python API wrapping the tcp/icp details I do not see a problem with that approach. |
Beta Was this translation helpful? Give feedback.
-
Imagine a library that works on the same principle as NiceGUI. A JSON configuration object is passed to Rust, after which Rust recursively creates the corresponding structures. When an event is sent from the frontend to Rust, the system checks whether this event needs to be processed on the Python side or stays in Rust. If Python is responsible, the corresponding event data is passed to Python. In this way, the system enables seamless integration with a low-level system language such as Rust. |
Beta Was this translation helpful? Give feedback.
-
as shown heredsdfdfsd.mp4 |
Beta Was this translation helpful? Give feedback.
-
Data Flow |
Beta Was this translation helpful? Give feedback.
-
Python Versionbbgg.mp4 |
Beta Was this translation helpful? Give feedback.
-
I guess your feature request is to replace pywebview with some sort of Rust implementation. Have you already such a Rust library? Are you experimenting with one? Where is the source code? Could you please elaborate in clear sentences what you need at this point from NiceGUI? |
Beta Was this translation helpful? Give feedback.
-
Hi @rodja I would like to know where the native GUI should support asyncio. There are problems with native GUIs that might answer your question. Is your problem with pywebview that the main thread is blocked? Please tell me explicitly where you want asyncio to work and what exactly is the problem you have with pywebview. I have been working on this framework for several months, there are problems with native GUIs that no one can help you with because of the native API interfaces. |
Beta Was this translation helpful? Give feedback.
-
Here's an exampleAufzeichnung.2025-02-14.233631.mp4 |
Beta Was this translation helpful? Give feedback.
-
Pywebview needs to run in it's own process because it otherwise blocks execution. That makes interaction with it complicated: getting/setting window size, updating title etc always needs inter-process communication (which we do with two |
Beta Was this translation helpful? Give feedback.
-
If you had the opportunity to have someone create a native window based on webviews using a system language (Rust), what would you want? What pywebview does not offer
Beta Was this translation helpful? Give feedback.
All reactions