v0.1.0 4a0dffe

README.md RawHistoryFolder

WLTurbo - High-Performance Wayland Client for Go

🚀 Ultra-fast, zero-allocation Wayland client library optimized for gaming and real-time applications

Features

  • 🎯 Sub-microsecond latency - < 500ns input event processing
  • ⚡ Zero-allocation hot paths - No GC pressure during event handling
  • 🎮 Gaming optimized - 360-500+ FPS support, 8000Hz device compatibility
  • 🔒 Lock-free architecture - MPSC queues and atomic operations
  • 🏎️ SIMD optimizations - Vectorized batch operations
  • 📊 Cache-friendly - 64-byte aligned data structures
  • 🔧 Go 1.24 ready - Leverages latest performance features

Performance Targets

Metric Target Description
Input Latency < 125μs Input-to-dispatch (8000Hz polling rate)
Event Dispatch < 50ns Per-event processing time
Allocations 0 Zero allocations in steady state
GC Pause < 10μs Maximum garbage collection pause
Throughput 16,000+ Events per second capacity

Gaming Hardware Support

  • 8000Hz Mice: Razer Viper 8K, Corsair Sabre RGB Pro
  • 8000Hz Keyboards: Wooting 80HE with true analog scanning
  • High-refresh displays: ASUS ROG Swift 500Hz, BenQ Zowie XL2566K
  • VRR/G-Sync: Variable refresh rate awareness

Quick Start

package main

import (
    "github.com/bnema/wlturbo"
)

func main() {
    // Connect to Wayland display
    display, err := wlturbo.Connect("")
    if err != nil {
        panic(err)
    }
    defer display.Close()

    // Ultra-low latency event loop
    for {
        if err := display.Dispatch(); err != nil {
            break
        }
    }
}

Architecture

WLTurbo is built with gaming performance in mind:

  • Lock-free Event Queue: MPSC ring buffer for zero-contention event handling
  • Object Pool: Pre-allocated event objects to eliminate malloc overhead
  • Direct Dispatch: Array-based handler lookup for objects < 1024
  • Batch Processing: Process multiple events per syscall
  • Memory Pool: Size-classed allocators for temporary buffers

Benchmarks

BenchmarkEventDispatch-16    20000000    50.2 ns/op    0 B/op    0 allocs/op
BenchmarkMessageSend-16      40000000    25.1 ns/op    0 B/op    0 allocs/op
BenchmarkFDPassing-16         5000000   200.0 ns/op    0 B/op    0 allocs/op

Requirements

  • Go 1.24+ (for latest performance features)
  • Linux (Wayland compositor required)
  • Modern CPU (for SIMD optimizations)

Status

🚧 Active Development - Core functionality complete, optimizations ongoing

License

MIT License - see LICENSE file for details

Contributing

PRs welcome! Please read CONTRIBUTING.md for guidelines.

Focus areas:

  • Performance optimizations
  • Gaming-specific features
  • Protocol extension support
  • Benchmark improvements
source
1# WLTurbo - High-Performance Wayland Client for Go
2
3🚀 **Ultra-fast, zero-allocation Wayland client library optimized for gaming and real-time applications**
4
5## Features
6
7- **🎯 Sub-microsecond latency** - < 500ns input event processing
8- **⚡ Zero-allocation hot paths** - No GC pressure during event handling
9- **🎮 Gaming optimized** - 360-500+ FPS support, 8000Hz device compatibility
10- **🔒 Lock-free architecture** - MPSC queues and atomic operations
11- **🏎️ SIMD optimizations** - Vectorized batch operations
12- **📊 Cache-friendly** - 64-byte aligned data structures
13- **🔧 Go 1.24 ready** - Leverages latest performance features
14
15## Performance Targets
16
17| Metric | Target | Description |
18|--------|--------|-------------|
19| **Input Latency** | < 125μs | Input-to-dispatch (8000Hz polling rate) |
20| **Event Dispatch** | < 50ns | Per-event processing time |
21| **Allocations** | 0 | Zero allocations in steady state |
22| **GC Pause** | < 10μs | Maximum garbage collection pause |
23| **Throughput** | 16,000+ | Events per second capacity |
24
25## Gaming Hardware Support
26
27- **8000Hz Mice**: Razer Viper 8K, Corsair Sabre RGB Pro
28- **8000Hz Keyboards**: Wooting 80HE with true analog scanning
29- **High-refresh displays**: ASUS ROG Swift 500Hz, BenQ Zowie XL2566K
30- **VRR/G-Sync**: Variable refresh rate awareness
31
32## Quick Start
33
34```go
35package main
36
37import (
38    "github.com/bnema/wlturbo"
39)
40
41func main() {
42    // Connect to Wayland display
43    display, err := wlturbo.Connect("")
44    if err != nil {
45        panic(err)
46    }
47    defer display.Close()
48
49    // Ultra-low latency event loop
50    for {
51        if err := display.Dispatch(); err != nil {
52            break
53        }
54    }
55}
56```
57
58## Architecture
59
60WLTurbo is built with gaming performance in mind:
61
62- **Lock-free Event Queue**: MPSC ring buffer for zero-contention event handling
63- **Object Pool**: Pre-allocated event objects to eliminate malloc overhead
64- **Direct Dispatch**: Array-based handler lookup for objects < 1024
65- **Batch Processing**: Process multiple events per syscall
66- **Memory Pool**: Size-classed allocators for temporary buffers
67
68## Benchmarks
69
70```
71BenchmarkEventDispatch-16    20000000    50.2 ns/op    0 B/op    0 allocs/op
72BenchmarkMessageSend-16      40000000    25.1 ns/op    0 B/op    0 allocs/op
73BenchmarkFDPassing-16         5000000   200.0 ns/op    0 B/op    0 allocs/op
74```
75
76## Requirements
77
78- **Go 1.24+** (for latest performance features)
79- **Linux** (Wayland compositor required)
80- **Modern CPU** (for SIMD optimizations)
81
82## Status
83
84🚧 **Active Development** - Core functionality complete, optimizations ongoing
85
86## License
87
88MIT License - see LICENSE file for details
89
90## Contributing
91
92PRs welcome! Please read CONTRIBUTING.md for guidelines.
93
94Focus areas:
95- Performance optimizations
96- Gaming-specific features
97- Protocol extension support
98- Benchmark improvements

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 8

↑↓ moveenter openesc close