Files
amethyst/cli/hang-interop/hang-publish/Cargo.toml
T
Claude 33a9e8f053 feat(nests): T16 Phase 2 — real hang-listen + hang-publish bodies
Replaces the Phase 1 stubs with working moq-lite-03 audio
publish/subscribe loops:

- hang-publish: opens a broadcast under <relay>/<broadcast>,
  publishes a hang Catalog with one Opus / Container::Legacy
  audio rendition, and pumps Opus-encoded sine-wave frames in
  groups of 5 (matching Amethyst's NestMoqLiteBroadcaster
  default) for --duration seconds.
- hang-listen: connects to the same broadcast, reads the catalog,
  picks the first Opus audio rendition with container.kind=legacy,
  decodes each Opus packet, and writes Float32 little-endian PCM
  to --output-pcm (or stdout with `-`).

Both use moq-native 0.13 with the quinn + aws-lc-rs features and
explicitly install the rustls aws-lc-rs crypto provider in main()
since rustls 0.23 no longer auto-installs.

Verified Rust↔Rust interop end-to-end: 3-second 440 Hz publish →
2.7 s of decoded PCM, RMS 0.35 (matching half-amplitude sine),
880 zero-crossings/sec (matches 440 Hz exactly).

Phase 2.B (JVM Opus encoder/decoder) and 2.C (I1 amethyst-speaker
→ hang-listen) are next.

https://claude.ai/code/session_01ERJPUYfdLPwZ99pr5EcEcV
2026-05-06 20:58:09 +00:00

31 lines
891 B
TOML

[package]
name = "hang-publish"
version.workspace = true
edition.workspace = true
publish.workspace = true
license.workspace = true
# Reference moq-lite / hang publisher: opens a broadcast, declares one
# Opus / Container::Legacy audio rendition, encodes a sine wave, and
# pumps frames in 5-frame groups for `--duration` seconds. Used by
# the cross-stack interop tests for the Rust → Amethyst direction.
[[bin]]
name = "hang-publish"
path = "src/main.rs"
[dependencies]
anyhow.workspace = true
clap.workspace = true
tokio.workspace = true
hang = "0.15"
moq-lite = "0.15"
moq-native = { version = "0.13", default-features = false, features = ["quinn", "aws-lc-rs"] }
opus = "0.3"
bytes = "1"
rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs"] }
serde_json = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
url = "2"