Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Clean environment
run: cargo clean
54 changes: 54 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

OSC Parse is a Rust-based TUI (Terminal User Interface) tool for debugging OSC (Open Sound Control) messages on a network. It provides a simple way to analyze OSC traffic without requiring complex tools like Wireshark.

## Build Commands

```bash
# Build the project
cargo build

# Build with verbose output
cargo build --verbose

# Run the application
cargo run

# Run tests
cargo test --verbose
```

## Architecture

The codebase is organized into three modules:

- **`src/main.rs`** - Entry point that initializes the TUI and starts the OSC listener on port 8000
- **`src/display/mod.rs`** - TUI implementation using ratatui and crossterm for terminal rendering
- **`src/network/mod.rs`** - UDP socket listener that receives OSC packets and invokes callbacks
- **`src/osc/mod.rs`** - Manual OSC message parser handling addresses and data types (float, int, string)

### Data Flow

1. `main.rs` launches the TUI via `display::run_tui()`
2. Network listener (`network::listen_osc`) binds to UDP port 8000
3. Received packets are passed to `osc::parse_message` for parsing
4. OSC address and typed values (f, i, s) are extracted following OSC protocol alignment rules

## Testing

A Python helper script exists at `test/send_osc_test.py` using `pythonosc` to send test messages to the running application.

## Dependencies

- **ratatui** - TUI framework
- **crossterm** - Terminal manipulation

## Notes

- OSC parsing is done manually without external OSC libraries
- All data is big-endian per OSC spec
- Buffer alignment follows 4-byte boundaries as required by OSC protocol
Loading
Loading