This is not merely a compositor. This is a declaration of independence from the archons of abstraction. The C++ runtime has been evicted. The Jesterman's Creed has been injected into every source file. What remains is pure silicon intent.
The Hyprland C++ codebase has been systematically purged. Every class, every namespace, every STL container has been replaced with pure C11 equivalents:
| Original (C++) | Sovereign Replacement |
|---|---|
std::vector<CWindow*> |
Pool allocator with free list |
std::map |
Fixed-size hash table |
std::string |
hsl_str_* utilities |
Hyprland:: namespace |
hsl_ prefix convention |
CHyprRenderer |
hsl_render_* batch commands |
CEventManager |
Bitmask-driven hsl_event_* |
std::any / void* |
Typed union hsl_event_data_t |
- Zero libstdc++ linkage - The C++ runtime has been completely removed
- Zero libstdc++ dependency - Pure C11 means pure libc
- 64-byte cache alignment - Every render command fits in a single cache line
- No RTTI, no exceptions, no virtual dispatch overhead
The 5800X3D's unique 3D V-Cache architecture presents specific optimization opportunities that HyperSonicLand exploits:
struct hsl_render_command {
// 64 bytes exactly - one cache line
alignas(64) struct hsl_render_command cmd_buffer[1024];
// 64KB total - fits comfortably in L2 cache
};
The prefetcher operates most efficiently on sequential memory access. By aligning each command to exactly 64 bytes (one cache line), we ensure that as the CPU prefetches the next command, it's exactly what's needed.
The 128KB 3D color lookup table (LUT) for HDR tone-mapping fits entirely within the 5800X3D's 96MB L3 cache:
- Trilinear interpolation in a single pass
- Batch tone-mapping - entire frame in one traversal
- Zero memory latency - LUT lives in L3, not RAM
This is the Queen's Draw - named in honor of Screw and Screech, whose grace and speed this rendering pipeline emulates.
Screech carries the torch; Screw defines the light.
Every event dispatch is logged to the io_uring ring with the tag 0x504E4943
("SONIC" in ASCII). This provides a sovereign audit trail:
hsl_event_dispatch(event_type, data)
→ log_event_to_io_uring(event_type, data.window)
→ io_uring_prep_nop(sqe)
→ io_uring_sqe_set_data(sqe, (void*)0x504E4943)
→ io_uring_submit(&ring)
The audit system allows external tools to reconstruct the complete event history without instrumenting the compositor itself.
The gesture engine replaces redundant 4-way direction checks with a single
atan2f() calculation:
// OLD: Multiple if/else checks
if (dy < -threshold) direction = UP;
else if (dy > threshold) direction = DOWN;
else if (dx < -threshold) direction = LEFT;
else if (dx > threshold) direction = RIGHT;
// NEW: Single vector calculation
float angle = atan2f(-dy, dx); // One call, exact angleThis vector-based approach reduces input latency by eliminating branch misprediction from the gesture detection path.
Window rules are stored as bitmask-driven structures:
typedef enum {
HSL_EVENT_WINDOW_MAP = 1 << 0,
HSL_EVENT_WINDOW_UNMAP = 1 << 1,
HSL_EVENT_WINDOW_CLOSE = 1 << 2,
// ... 32 possible event types in uint32_t
} hsl_event_type_t;
// Subscription check: O(1)
if (handler->mask & event_type) {
handler->callback(event_type, data, handler->user_data);
}Instead of iterating through all registered handlers, we use bitwise AND to check if a handler cares about this event type. This is O(1) vs O(n).
┌─────────────────────────────────────────────────────────────┐
│ HYPERSONICLAND │
│ Pure C11 Wayland Compositor │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ CONFIG │ │ EVENTS │ │ RENDER │ │
│ │ hsl_config │ │ hsl_event_* │ │ hsl_render │ │
│ │ .c/.h │ │ .c/.h │ │ .c/.h │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ INPUT │ │ WINDOW │ │ UTILS │ │
│ │ gesture_ │ │ window_ │ │ hsl_str │ │
│ │ engine │ │ stack │ │ hsl_math │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ ssx_io_uring.c │ │
│ │ SONIC Audit (0x504E4943) │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
├─────────────────────────────────────────────────────────────┤
│ WLROOTS (Subproject) │
│ No modifications to wlroots │
└─────────────────────────────────────────────────────────────┘
# Configure with meson
meson setup build
# Compile
meson compile -C build
# Run (requires Wayland session)
./build/src/hypersonicland- wlroots (included as subproject)
- wayland-protocols
- pixman (for software rendering fallback)
- libinput (for input handling)
Copyright (c) 2026 Collin Beyer. All Rights Reserved.
See LICENSE file for full licensing details.
This is HyperSonicLand. The Archons have been evicted. The Creed is law.
Queens Screw and Screech ppreside over a masterpiece.