Considerations for Power Draw with egui

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Mergify - Updating dependencies is time-consuming.
  • egui

    egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native

    I have been contemplating the development of an image manipulation tool as a side project during my university studies. After some consideration, I have decided to implement it in Rust using wgpu for rendering and compute shaders. The supported platforms will include desktop and desktop web. As an image manipulation tool requires more than just a viewport, it also needs some form of GUI around it. Therefore, the choice of GUI library, if any, becomes quite relevant from an architectural perspective. I have been exploring egui, but I have encountered a problem. Since it employs immediate mode rendering, the entire content of the application needs to be re-rendered every time a user interacts with it, such as moving their cursor over the window. This can result in a power draw that presents issues for portable devices like laptops.

  • wgpu

    Cross-platform, safe, pure-rust graphics api.

    I have been contemplating the development of an image manipulation tool as a side project during my university studies. After some consideration, I have decided to implement it in Rust using wgpu for rendering and compute shaders. The supported platforms will include desktop and desktop web. As an image manipulation tool requires more than just a viewport, it also needs some form of GUI around it. Therefore, the choice of GUI library, if any, becomes quite relevant from an architectural perspective. I have been exploring egui, but I have encountered a problem. Since it employs immediate mode rendering, the entire content of the application needs to be re-rendered every time a user interacts with it, such as moving their cursor over the window. This can result in a power draw that presents issues for portable devices like laptops.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • rerun

    Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.

    To test the power draw, I conducted an unscientific experiment by circling the cursor over both a GTK4 app (GNOME Console) and an egui app (Rerun Viewer), while monitoring the CPU/GPU utilization and stabilized power draw with PowerTOP. The results indicated that when circling the cursor over the GTK4 app, the CPU/GPU usage was nearly negligible, and the stabilized power draw was around 13 W. In contrast, when circling the cursor over the egui app, the CPU/GPU usage was considerably higher, resulting in a stabilized power draw of around 21 W. This amounts to an increase of approximately 60%. Taking into account a power draw of around 10 W when doing nothing at all, the increase becomes roughly 260%. I also tried the same experiment with Iced, and while the increase was not as extreme, it still utilized resources when circling the cursor over a blank surface.

  • pixels

    A tiny hardware-accelerated pixel frame buffer. 🦀

    You can use wgpu instead of opengl as in the pixels example: https://github.com/parasyte/pixels/tree/main/examples/minimal-fltk

  • iced

    A cross-platform GUI library for Rust, inspired by Elm

  • floem

    A native Rust UI library with fine-grained reactivity

  • rui

    Declarative Rust UI library

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • kayak_ui

    Bevy with https://github.com/StarArawn/kayak_ui

  • Ribir

    A declarative cross-platform GUI framework for Rust

  • Graphite

    2D raster & vector editor that melds traditional layers & tools with a modern node-based, fully non-destructive procedural workflow.

    There's also https://graphite.rs/ which is an existing image manipulation application in Rust project that you could join in with. It's currently rendering to SVG, but they are actively working on moving to Vello (which also builds on top of wgpu).

  • solid-docs

    Cumulative documentation for SolidJS and related packages.

    Since you're already planning to support the web, why not just use Tauri and build your UI with some sort of web stack? There are a handful of frontend web frameworks for Rust, so you wouldn't even need to write HTML/CSS/JS if you're looking to avoid that. But if you don't mind learning/writing some web code, SolidJS is stupid fast and lightweight.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts