OSC 1.0 core codecs, complete segment patterns and indivisible timed bundle batches
moon add CYang-dep/moonosc@0.2.0import { "CYang-dep/moonosc" @osc }let packet = @osc.Message({ address: "/mixer/gain", arguments: [@osc.float_argument(0.5)] })
let wire = @osc.encode_osc10(packet)
let recovered = @osc.decode_osc10(wire)| Consumer | Input and processing | Observable result | Run |
|---|---|---|---|
| Audio tools | Typed gain message, codec roundtrip, brace-pattern fanout, exact signature checks | Two accepted destinations; no callbacks before validation | moon run examples/audio |
| Interactive media | Future screen show/commit plus nested light cue | One indivisible screen batch and one light batch | moon run examples/media |
| Device gateways | SLIP input arriving one byte at a time, decoding and JSON diagnostics | One reconstructed packet; exact replay including escaped bytes | moon run examples/device |
moon info && moon fmt
moon fmt --check
moon check --deny-warn --target wasm-gc
moon test --deny-warn --target wasm-gc
moon build --deny-warn --target wasm-gc
python scripts/reference_vectors.py --target wasm-gc
python scripts/audit.py
moon run examples/conformancepub struct Dispatcher {
// private fields
}fn Dispatcher::add(self : Dispatcher, id : Int, address : String, signature? : String?) -> Unit raise OscErrorfn Dispatcher::plan(self : Dispatcher, message : Message, all_or_nothing? : Bool, work_limit? : Int, limits? : Limits) -> DispatchPlan raise OscErrorpub struct Osc10Scheduler {
// private fields
}fn Osc10Scheduler::enqueue(self : Osc10Scheduler, packet : Packet, now : TimeTag, limits? : Limits) -> Array[UInt64] raise OscErrorfn Osc10Scheduler::poll(self : Osc10Scheduler, now : TimeTag, max_batches? : Int) -> Array[ScheduledOsc10Batch] raise OscErrorpub struct Pattern {
// private fields
}pub struct Router {
// private fields
}pub struct Scheduler {
// private fields
}pub struct SizeFramer {
// private fields
}fn SizeFramer::new(max_frame? : Int, max_feed? : Int, max_frames? : Int) -> SizeFramer raise OscErrorpub struct SlipFramer {
// private fields
}fn SlipFramer::new(max_frame? : Int, max_feed? : Int, max_frames? : Int) -> SlipFramer raise OscErrorInstall
Download zipOSC 1.0 core codecs, complete segment patterns and indivisible timed bundle batches