A high-performance debugging tool for monitoring application events and logs, built with Rust. Native macOS implementation of the Ray debugging tool with HTTP server and GPUI-based GUI.
- Native macOS GUI: Built with GPUI for optimal performance
- HTTP Server: Receives event payloads on port 23517
- Event Types: HTTP requests, cache operations, logs, queries, exceptions, and application logs
- Real-time Filtering: Filter events by type with optimized performance
- Virtual Scrolling: Handle thousands of events without performance degradation
- Memory Efficient: Arc-based storage minimizes cloning and memory usage
- Performance Optimized: Processes 1000+ events/second, maintains 60 FPS with 10,000+ events
- macOS only (GPUI is currently macOS-specific)
- Xcode (for Metal shader compiler)
- Rust 1.70+ with nightly features
# Clone and build
git clone https://github.com/yourusername/rust-ray-cli.git
cd rust-ray-cli
cargo build --release
# Run the application
cargo run --release-
Start the application: The GUI opens and HTTP server starts on
http://127.0.0.1:23517 -
Send events: POST JSON payloads to the server:
curl -X POST http://127.0.0.1:23517/ \
-H "Content-Type: application/json" \
-d '{
"payloads": [{
"type": "log",
"content": {
"values": ["Debug message", "Additional info"]
}
}]
}'- View events: Events appear in real-time with filtering options
Configure Ray to send events to localhost:23517:
// In ray.php config
'port' => 23517,
'host' => 'localhost',Note: You may need to patch vendor/spatie/ray/src/ArgumentConverter.php to bypass Symfony tags.
src/
├── main.rs # Application entry point
├── server.rs # HTTP server implementation
├── storage.rs # Event storage and management
├── ui/ # UI modules
│ ├── mod.rs # UI module exports
│ ├── app.rs # GUI application logic
│ ├── event_list.rs # Event list panel
│ ├── event_details.rs # Event details panel
│ └── components.rs # Shared UI components & helpers
└── events/ # Event processing modules
├── mod.rs # Event trait + dispatch
├── entry.rs # EventEntry struct
├── event_type.rs # EventType enum
├── http.rs # HTTP event (process + render)
├── cache.rs # Cache event (process + render)
├── log.rs # Log event (process + render)
├── query.rs # Query event (process + render)
├── exception.rs # Exception event (process + render)
└── application_log.rs # App log event (process + render)
Run benchmarks to test performance:
cargo benchOptimizations include:
- Arc-based storage to minimize allocations
- Virtual scrolling for large event lists
- Cached filtering with hash-based invalidation
- Optimized JSON processing with size limits
# Run tests
cargo test
# Check code
cargo check
# Format code
cargo fmt
# Lint code
cargo clippyUse ↑ and ↓ arrow keys to navigate events in the GUI.
Contributions are welcome! Please follow the existing architecture patterns and code style.
This project is open source and available under the MIT License.
