This is a Tauri plugin that integrates egui (immediate mode GUI) with Tauri applications. It allows rendering native egui interfaces directly in Tauri windows using WGPU for hardware-accelerated rendering.
cargo checkcd examples/vanilla/src-tauri
bun tauri devPlugin Structure (src/lib.rs):
EguiWindowConfig: Configuration for egui windowsWindowEguiExt: Extension trait that adds.make_egui()method to Tauri windowsinit(): Plugin initialization function
Rendering Pipeline (src/renderer.rs):
Renderer: Main rendering coordinator that manages GPU resources and egui renderingGpu: WGPU abstraction handling surface, device, queue, and configuration- Uses
egui_wgpu::Rendererfor the actual egui-to-GPU translation
- Window Extension Pattern: The plugin extends Tauri windows with egui capabilities via the
WindowEguiExttrait - GPU Rendering: Uses WGPU for hardware-accelerated rendering with egui-wgpu as the bridge
egui: Core immediate mode GUI libraryegui-wgpu: Bridge between egui and WGPUwgpu: Modern graphics API abstractiontauri: Cross-platform app frameworktauri-runtimeandtauri-runtime-wry: Low-level event access
See examples/vanilla/src-tauri/src/main.rs for usage pattern where a window is created and then converted to egui rendering.
- For a comprehensive complete integration, refer to egui-winit
- It supports resizing, input handling, and continuous rendering loops.
- Only single-frame rendering (no continuous render loop)
- No input handling
- No window resizing support