osc-devtools
⚠️ EXPERIMENTAL ⚠️
This crate is experimental and APIs may change significantly between versions.
CLI tools and examples for the osc-data-model workspace, providing utilities for testing, debugging, and demonstrating OSC intermediate representation functionality.
Installation
Or build from source:
Usage
The CLI provides subcommands for testing and demonstrating OSC data conversion:
# Show help
# Test JSON roundtrip conversion
# Test MessagePack roundtrip conversion
# Demonstrate complex bundle nesting and conversion
Examples
JSON Roundtrip Testing
Test that data survives JSON serialization and deserialization:
# Test JSON roundtrip with simple string data
MessagePack Roundtrip Testing
Test that data survives MessagePack serialization and deserialization:
# Test MessagePack roundtrip with simple string data
Bundle Demo
Demonstrate complex nested bundle structures and cross-format conversion:
# Creates complex nested bundles and tests conversion
This command:
- Creates complex nested bundle structures
- Tests JSON and MessagePack roundtrip conversion
- Verifies cross-codec compatibility
- Reports conversion success and data sizes
Development Usage
The tools are useful for:
- Testing codec implementations with real data
- Debugging serialization issues across formats
- Performance benchmarking of different formats
- Generating test fixtures for other projects
- Validating OSC data structures before processing
Command Reference
json-roundtrip
Tests JSON serialization and deserialization using a simple string value.
msgpack-roundtrip
Tests MessagePack serialization and deserialization using a simple string value.
bundle-demo
Demonstrates complex nested bundle creation and tests both JSON and MessagePack conversion with cross-format compatibility verification.
Dependencies
osc-ir: Core IR typesosc-codec-json: JSON serializationosc-codec-msgpack: MessagePack serializationclap: Command-line argument parsinganyhow: Error handling
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.