| Crates.io | osc-ir |
| lib.rs | osc-ir |
| version | 0.1.0-alpha.1 |
| created_at | 2025-10-27 02:58:33.659869+00 |
| updated_at | 2025-10-27 02:58:33.659869+00 |
| description | Experimental protocol-agnostic Intermediate Representation for OSC data compatible with JSON/MessagePack |
| homepage | https://github.com/Nagitch/osc-data-model |
| repository | https://github.com/Nagitch/osc-data-model |
| max_upload_size | |
| id | 1902162 |
| size | 24,176 |
⚠️ EXPERIMENTAL ⚠️
This crate is experimental and APIs may change significantly between versions.
A protocol-agnostic Intermediate Representation (IR) for OSC-adjacent data structures, designed to work seamlessly with JSON, MessagePack, and other serialization formats.
alloc feature for owned containers)Add this to your Cargo.toml:
[dependencies]
osc-ir = "0.1.0-alpha.1"
use osc_ir::{IrValue, IrBundle, IrTimetag};
// Create basic values
let message = IrValue::from("hello world");
let number = IrValue::from(42);
let boolean = IrValue::from(true);
// Create arrays
let array = IrValue::from(vec![
IrValue::from(1),
IrValue::from(2),
IrValue::from(3)
]);
// Create bundles with timetags
let mut bundle = IrBundle::new(IrTimetag::from_ntp(12345));
bundle.add_message(message);
bundle.add_message(number);
let bundle_value = IrValue::Bundle(bundle);
Enable OSC 1.1 support for additional types:
[dependencies]
osc-ir = { version = "0.1.0-alpha.1", features = ["osc11"] }
use osc_ir::IrValue;
// OSC 1.1 Color type (RGBA)
let color = IrValue::color(255, 128, 0, 255);
// OSC 1.1 MIDI message
let midi = IrValue::midi(0, 0x90, 60, 127);
For JSON/MessagePack serialization:
[dependencies]
osc-ir = { version = "0.1.0-alpha.1", features = ["serde"] }
alloc (default): Enable owned containers (Vec, String, etc.) for no_std environmentsserde: Enable serde serialization supportosc10 (default): OSC 1.0 support (bundles, timetags, basic types)osc11: OSC 1.1 support (includes OSC 1.0 plus Color and MIDI types)The crate works in no_std environments with the alloc feature:
[dependencies]
osc-ir = { version = "0.1.0-alpha.1", default-features = false, features = ["alloc"] }
Licensed under either of
at your option.