XerahS

Cross-Platform Architecture

Platform Abstraction Layer

XerahS is built on a strict "Core / Platform" separation model, ensuring that the business logic remains purely cross-platform while leveraging native capabilities on each OS.

Architecture Overview

Core (Platform Agnostic)

The XerahS.Core and XerahS.Common libraries contain 100% of the application logic but have zero dependencies on Windows Forms, WPF, or any OS-specific APIs. They communicate with the OS exclusively through abstract interfaces defined in XerahS.Platform.Abstractions.

Platform Implementations

Specific projects (XerahS.Platform.Windows, .Linux, .MacOS) implement these interfaces using native APIs (Win32/WinRT, X11/Wayland/DBus, Cocoa/ScreenCaptureKit) and are injected at runtime.

Supported Platforms

Windows

On Windows, XerahS utilizes a hybrid of modern WinRT APIs (for high-performance capture) and traditional Win32 (for low-level window management). It fully supports Windows 10 and 11, including dark mode integration and toast notifications.

Linux

The Linux implementation favors modern standards while maintaining broad compatibility:

  • Wayland Support: Uses XDG Desktop Portals and DBus for screen capture and global shortcuts, ensuring compatibility with GNOME and KDE Plasma.
  • X11 Fallback: Retains support for legacy X11 environments using XLib and XExtensions.
  • AppImage: Distributed as a single AppImage for easy deployment across distros.

macOS

XerahS wraps native macOS frameworks to provide a seamless experience:

  • ScreenCaptureKit: High-performance, low-overhead screen recording on macOS Monterey and newer.
  • Cocoa Interop: Native window management and menu bar integration.
  • Universal Binary: Optimization for both Apple Silicon and Intel Macs.