GUI Debugger
Oboromi includes an eframe/egui-based GUI that provides visual debugging capabilities.Launching the GUI
gui/src/gui/gui.rs:26
Features
Splash Screen
Splash Screen
The splash screen displays:
- Animated oboromi logo with fade-in/fade-out effects
- “Experimental” warning badge
- Project status information
- Automatic transition after ~1.6 seconds
gui/src/gui/gui.rs:41Test Runner
Test Runner
The main interface provides:
- “Run CPU Tests” button - Executes ARM64 instruction tests in background thread
- Results panel - Scrollable view of test output with color-coded results:
- 🟢 Green for passing tests
- 🔴 Red for failing tests
- ⚪ Gray for status messages
- Menu bar - File and About menus
gui/src/gui/gui.rs:157GUI Architecture
The GUI is built with:- eframe 0.33 - Application framework
- egui 0.33 - Immediate mode GUI library
- Thread-based test execution - Tests run in background to keep UI responsive
gui/src/gui/gui.rs:157
The GUI automatically requests repaints when tests are running to ensure the interface stays responsive.
Logging System
Oboromi usesfern and log for flexible, structured logging.
Log Configuration
The logging system is configured ingui/src/main.rs:5 with:
Log Output
Logs are written to two destinations:- stdout - Console output for immediate feedback
- oboromi.log - Persistent log file in the current directory
Log Format
Each log entry includes:Log Levels
The logger is set toDebug level by default, showing:
- Error - Critical failures
- Warn - Potential issues
- Info - General information
- Debug - Detailed debugging information
- Trace - Extremely verbose output (requires feature flag)
gui/src/main.rs:15
Trace Feature Flag
For extremely verbose debugging, enable thetrace feature:
- Trace-level logging throughout the codebase
- Detailed instruction execution logging
- Memory access tracing
Trace in Code
When the trace feature is enabled, the application logs a startup message:gui/src/main.rs:42
Feature Configuration
The trace feature is defined ingui/Cargo.toml:19 and propagates to the core library:
Debugging Techniques
Test-Driven Debugging
When investigating a bug:
- Write a test that reproduces the issue
- Run the test with
cargo test -- --nocapture - Add log statements to trace execution
- Fix the bug
- Verify the test passes
GUI-Based Debugging
For visual inspection:
- Launch the GUI with
cargo run - Click “Run CPU Tests”
- Examine color-coded results
- Check
oboromi.logfor detailed output
Platform-Specific Debugging
macOS
If you encounter issues:- Check that Rosetta 2 is not interfering (for x86_64 builds)
- Verify CMake and Ninja are properly installed
- Rebuild with
cargo clean && cargo build
Windows
Ensure you have:- MSVC Build Tools installed
- CMake and Ninja in PATH
- Proper Visual Studio environment variables set
Linux
Most issues on Linux relate to:- Missing Clang or C++ compiler
- CMake version too old (need 3.16+)
- Vulkan development libraries (for GPU code)
Debugging Memory Issues
For memory-related bugs:-
Check shared memory initialization
-
Verify memory access patterns
-
Enable address sanitizer (Linux/macOS)
The address sanitizer requires nightly Rust:
rustup default nightlyUseful Debugging Commands
Reading Log Files
Theoboromi.log file contains chronological entries. Use standard tools to analyze:
For more information on the test suite structure, see the Testing page.
