rust-tray-icon

Guide building cross-platform Rust tray apps with tray-icon, winit, and egui.

3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/yankeeinlondon/rusty-biscuit --skill rust-tray-icon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-tray-icon
Source: https://github.com/yankeeinlondon/rusty-biscuit/tree/main/.claude/skills/rust-tray-icon
Command: npx skills add https://github.com/yankeeinlondon/rusty-biscuit --skill rust-tray-icon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds robust, cross-platform system tray apps in Rust using tray-icon, winit, and egui, enabling native OS integration and GUI workflows without reinventing boilerplate.

Core Features & Use Cases

  • Cross-platform tray icons with native menus and platform-specific behavior
  • GUI integration using egui and winit event loops
  • Auto-launch options and single-instance patterns
  • Examples and patterns for menu systems, notifications, and platform quirks
  • Use Case: Create a background tray app that opens a settings window from a tray menu and persists across reboots

Quick Start

Install and scaffold a Rust project and follow the code patterns to initialize a TrayIcon with a menu and basic event loop.

Frequently Asked Questions about rust-tray-icon

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a cross-platform system tray app in Rust with native menus?

Build a cross-platform system tray app in Rust by using tray-icon with winit and egui to handle native OS menus and GUI event loops. This Skill provides code patterns to initialize the tray, manage events, and scaffold the project across Windows, macOS, and Linux.

Does the tray-icon crate support GUI integration with egui and winit?

Yes, tray-icon supports GUI integration with egui and winit by combining their event loops. This allows you to render a GUI window using egui while managing background tray events and native menus through the winit event loop.

Can I create a Rust tray application that auto-launches and runs as a single instance?

Yes, you can implement auto-launch and single-instance patterns for your Rust tray application. This Skill outlines workflows to persist your app across reboots and prevent multiple instances from running simultaneously.

What is the best way to handle platform-specific quirks when building Rust tray icons?

The best way to handle platform-specific quirks in Rust tray icons is to follow repository-driven requirements and platform-specific workflows. This Skill specifies safety considerations and patterns to manage behavior differences across Windows, macOS, and Linux.

Why do I need winit and egui to create a system tray app in Rust?

You need winit and egui to create a system tray app in Rust because winit manages the cross-platform event loop required for tray events, while egui provides the immediate-mode GUI for rendering settings windows or overlays triggered from the tray menu.

Are there limitations when using tray-icon for background apps on Linux compared to Windows and macOS?

Limitations when using tray-icon for background apps on Linux involve managing desktop environment differences and platform quirks. This Skill addresses these constraints by outlining safety considerations and platform-specific workflows to ensure consistent native menu behavior.