Skip to content

Commit 7489ae6

Browse files
kixelatedclaude
andauthored
moq-clock: convert to a moq-native example (#1494)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9568550 commit 7489ae6

19 files changed

Lines changed: 224 additions & 764 deletions

File tree

.release-plz.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
[workspace]
22
dependencies_update = true
33
git_release_enable = false
4-
5-
# moq-clock is an example binary, not a distributed crate. publish = false
6-
# in its Cargo.toml stops cargo publish; release = false here also stops
7-
# release-plz from bumping the version, writing CHANGELOG entries, or
8-
# tagging it.
9-
[[package]]
10-
name = "moq-clock"
11-
release = false
12-

CLAUDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ Key architectural rule: The CDN/relay does not know anything about media. Anythi
4242
```
4343
/rs/ # Rust crates
4444
moq-net/ # Core networking layer (published as moq-net; negotiates moq-lite or moq-transport)
45-
moq-native/ # QUIC/WebTransport connection helpers for native apps
45+
moq-native/ # QUIC/WebTransport connection helpers for native apps; clock example lives in examples/clock.rs
4646
moq-relay/ # Clusterable relay server (binary: moq-relay)
4747
moq-token/ # JWT authentication library
4848
moq-token-cli/ # JWT token CLI tool (binary: moq-token-cli)
4949
moq-cli/ # CLI tool for media operations (binary: moq)
50-
moq-clock/ # Clock synchronization example (binary: moq-clock)
5150
moq-mux/ # Media muxers/demuxers (fMP4, CMAF, HLS)
5251
moq-audio/ # Native PCM ↔ Opus encode/decode on top of moq-mux
5352
hang/ # Media encoding/streaming (catalog/container format)

Cargo.lock

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ members = [
66
"rs/moq-audio",
77
"rs/moq-boy",
88
"rs/moq-cli",
9-
"rs/moq-clock",
109
"rs/moq-ffi",
1110
"rs/moq-gst",
1211
"rs/moq-loc",
@@ -26,7 +25,6 @@ default-members = [
2625
"rs/moq-boy",
2726
"rs/moq-audio",
2827
"rs/moq-cli",
29-
"rs/moq-clock",
3028
# "rs/moq-ffi", # requires Python/maturin
3129
# "rs/moq-gst", # requires GStreamer
3230
"rs/moq-loc",

demo/pub/justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ clock action url="http://localhost:4443/anon" *args:
211211
exit 1; \
212212
fi
213213

214-
cargo run --bin moq-clock -- --url "{{url}}" --broadcast "clock" {{args}} {{action}}
214+
cargo run -p moq-native --example clock -- --url "{{url}}" --broadcast "clock" {{args}} {{action}}
215215

216216
# Connect tokio-console to the publisher (port 6681).
217217
console:

doc/lib/rs/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,6 @@ See [Authentication guide](/bin/relay/auth) for details.
158158

159159
## Utilities
160160

161-
### moq-clock
162-
163-
Timing and clock utilities for synchronization.
164-
165161
### libmoq
166162

167163
[![docs.rs](https://docs.rs/libmoq/badge.svg)](https://docs.rs/libmoq)

flake.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
name = "moq-all";
139139
paths = [
140140
moq-relay
141-
moq-clock
142141
moq-cli
143142
moq-token-cli
144143
];
@@ -147,7 +146,6 @@
147146
# Inherit packages from the overlay
148147
inherit (overlayPkgs)
149148
moq-relay
150-
moq-clock
151149
moq-cli
152150
moq-token-cli
153151
moq-boy

js/clock/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you're running a relay server locally, use `http://localhost:4443/anon` inste
2222

2323
## Wire Format
2424

25-
The wire format is identical to the Rust `moq-clock` crate:
25+
The wire format is identical to the Rust [clock example](https://github.com/moq-dev/moq/blob/main/rs/moq-native/examples/clock.rs):
2626

2727
1. **Groups**: Each group represents one minute of data
2828
2. **Base Frame**: First frame contains the timestamp base (e.g., "2025-01-31 14:23:")

nix/overlay.nix

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ in
2626
}
2727
);
2828

29-
moq-clock = craneLib.buildPackage (
30-
crateInfo ../rs/moq-clock/Cargo.toml
31-
// {
32-
src = craneLib.cleanCargoSource ../.;
33-
cargoExtraArgs = "-p moq-clock";
34-
}
35-
);
36-
3729
moq-cli = craneLib.buildPackage (
3830
crateInfo ../rs/moq-cli/Cargo.toml
3931
// {

py/moq-rs/examples/clock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Publish or subscribe to a clock track — the Python twin of `rs/moq-clock`.
1+
"""Publish or subscribe to a clock track. Python twin of `rs/moq-native/examples/clock.rs`.
22
33
Each minute is a new group; each second is a frame inside that group. The first
44
frame of every group is the "YYYY-MM-DD HH:MM:" prefix, followed by one "SS"

0 commit comments

Comments
 (0)