I built Pyzed: native desktop GUIs in Python, drawn by Rust's Iced
Описание и применение
Pyzed позволяет писать десктопные GUI на Python, используя Rust‑библиотеку Iced для рендеринга, обеспечивая современный вид и производительность без больших зависимостей.
Задача
Python desktop tools often rely on Tkinter, Qt, or Electron‑style frameworks, which either look dated, have large dependencies, or bundle heavy rendering engines.
Результат
Pyzed enables developers to write desktop GUIs in Python with the look and performance of modern editors, eliminating the need for large dependencies or bundled rendering engines.
Рабочий процесс
- Install pyzed-ui via pip.
- Define a class inheriting from pz.App with title, state, update, and view methods.
- Use pyzed.ui helpers to compose widgets (input, heading, button, icon_button, etc.).
- Call pz.run() with the app class to launch the GUI.
- Pyzed builds a widget tree in Python, passes it to Rust via PyO3, and renders with wgpu/tiny‑skia.
- Events trigger update() or callbacks, then view() is called again.
- The GIL is released during the event loop, allowing Python threads to continue.
Доказательства
Every time I started a desktop tool in Python I hit the same choice. Tkinter is always there, but the result looks like 2005. Qt is powerful, but it's a big dependency with a big API. Flet and Electron-style tools look modern, but they ship a whole rendering engine next to your app.
So I built Pyzed, an open-source framework where Python describes the interface and Iced, a GUI toolkit written in Rust, lays it out and draws it on the GPU.
pip install pyzed-ui
That window already has a dark theme, focus rings, hover states and proper text rendering. There's nothing to style.
Pyzed follows the Elm architecture: your app has state, an update that changes it, and a view that turns it into widgets. Python decides what is shown; Rust decides how it's drawn.
- Дата записи: 2026-10-25T04:26:09.542Z