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 | ~3,800 (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: Entirely C# using GtkSharp
- macOS: Thin Objective-C wrapper (~500 LOC) for Cocoa APIs
Licensing
Hermes uses the Elastic License 2.0, which means:
- Free for non-commercial, educational, open source, and small businesses (<$1M revenue)
- $695/app/year for commercial use by organizations >$1M revenue
See Licensing for full 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)
