Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built Pyzed: native desktop GUIs in Python, drawn by Rust's Iced

说明与用途

Pyzed 让开发者用 Python 编写桌面 GUI,利用 Rust 的 Iced 进行 GPU 渲染,提供现代编辑器风格的 UI,避免大型依赖。

问题

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