Why Hermes?
The Problem
Building desktop apps with .NET has historically meant choosing between two fundamentally different approaches:
Native Control Frameworks
These render UI using platform widgets or custom drawing:
- WPF — Mature and powerful, but Windows-only with no cross-platform path
- WinForms — Simple and fast, but dated and Windows-only
- Avalonia — True cross-platform XAML, but requires learning a new UI paradigm
- MAUI — Microsoft-backed cross-platform, but heavy abstraction with inconsistent behavior across platforms
WebView-Based Frameworks
These render web content (HTML/CSS/JS) inside a native shell:
- Electron — Great ecosystem with full native menu support, but large bundles (~150MB+) and high memory usage
- Photino — Lightweight .NET wrapper, but limited native menu support and complex C++ codebase
- Tauri — Rust-based and efficient with native menus, but requires Rust for native extensions
For .NET developers wanting a lightweight WebView framework with native menu support, the options are limited. Photino is the closest, but its menu capabilities are basic and its C++ codebase makes contributions difficult.
Hermes' Approach
Hermes takes a different approach:
1. Minimal Native Code
| Framework | Lines of Code |
|---|---|
| Hermes | ~4,900 (mostly C#) |
| Photino | ~12,300 |
| Electron | Millions |
Less code means fewer bugs, easier maintenance, and faster builds.
2. Native Menus First
Hermes was designed from the ground up for applications that need:
- Dynamic menu modification at runtime
- Plugin loading that adds menu items
- Accelerator keys that work natively
- Platform-appropriate behavior (macOS dock menus, Windows system menus)
// Add a menu item at runtime
menuBar["Tools"].InsertItem(
afterId: "tools.options",
label: "My Plugin",
commandId: "plugins.myplugin.open"
);3. Modern .NET
Hermes targets .NET 10+ and uses:
LibraryImportwith source generators (AOT-ready)file-scoped types and required membersSpan<T>andMemory<T>throughout- Primary constructors where appropriate
4. Pure C# Where Possible
- Windows: Entirely C# using Microsoft.Web.WebView2 and CsWin32
- Linux: Thin C shim (~1,800 LOC) for GTK3 and WebKit2GTK
- macOS: Thin Objective-C shim (~3,100 LOC) for Cocoa APIs
Licensing
Hermes is open source under the MIT License. It is free for any use, commercial included, and needs no license key.
See Licensing for details.
When to Use Hermes
Hermes is ideal for:
- IDEs and code editors
- Developer tools
- Desktop utilities with plugin systems
- Any app needing native menu integration
Consider alternatives if you need:
- Mobile support (use MAUI or Flutter)
- Extremely small binary size (consider Tauri with Rust)
- Legacy .NET Framework support (use WinForms or WPF)
