Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Bash(cargo *)",
"Bash(bun *)",
"Bash(ffprobe:*)",
"Bash(rs/moq-c/build.sh:*)",
"Bash(rs/libmoq/build.sh:*)",
"WebFetch(domain:www.ietf.org)",
"WebFetch(domain:datatracker.ietf.org)",
"WebFetch(domain:docs.rs)",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/alert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- Docker
- GStreamer CI image
- Interop
- moq-c
- libmoq
- moq-cli
- moq-gst
- moq-relay
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run: nix develop --command just api-diff ${ARGS:+"$ARGS"}
env:
ARGS: ${{ steps.mode.outputs.args }}
# Lists and downloads the moq-c and moq-ffi release assets.
# Lists and downloads the libmoq and moq-ffi release assets.
GH_TOKEN: ${{ github.token }}
- name: Keep the report
if: ${{ !cancelled() && steps.diff.outcome != 'skipped' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: ./.github/actions/nix

# The relay, cli, moq-ffi, and moq-c all build from source. The nightly
# The relay, cli, moq-ffi, and libmoq all build from source. The nightly
# run publishes them for the pull requests that touch the harness.
- name: Rust cache
id: rust-cache
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/moq-c.yml → .github/workflows/libmoq.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: moq-c
name: libmoq

on:
push:
tags:
- "moq-c-v*"
- "libmoq-v*"
# Dry-run: build everything, publish nothing. Nightly calls every release
# workflow this way so a broken build surfaces before the tag is cut.
workflow_call:
Expand Down Expand Up @@ -55,23 +55,23 @@ jobs:
- name: Parse version
id: parse
shell: bash
run: just gh release parse-version moq-c
run: just gh release parse-version libmoq

- name: Build and package
shell: bash
env:
TARGET: ${{ matrix.target }}
VERSION: ${{ steps.parse.outputs.version }}
run: |
just rs package-moq-c \
just rs package-libmoq \
--target "$TARGET" \
--version "$VERSION" \
--output dist

- name: Upload artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: moq-c-${{ matrix.target }}
name: libmoq-${{ matrix.target }}
path: dist/*

release:
Expand All @@ -92,11 +92,11 @@ jobs:

- name: Parse version
id: parse
run: just gh release parse-version moq-c
run: just gh release parse-version libmoq

- name: Find previous tag
id: prev_tag
run: just gh release prev-tag moq-c
run: just gh release prev-tag libmoq

- name: Download artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
Expand All @@ -108,7 +108,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.ref_name }}
RELEASE_TITLE: "moq-c v${{ steps.parse.outputs.version }}"
RELEASE_TITLE: "libmoq v${{ steps.parse.outputs.version }}"
RELEASE_PREV_TAG: ${{ steps.prev_tag.outputs.tag }}
run: just gh release create artifacts

14 changes: 7 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ jobs:
uncached: true
artifact: js-coverage
artifact-path: target/coverage/js
# OBS (over moq-ffi) and moq-c's C fixtures link a Rust staticlib from
# outside cargo, so a stale `rs/moq-c/native-libs/*.txt` breaks them and
# OBS (over moq-ffi) and libmoq's C fixtures link a Rust staticlib from
# outside cargo, so a stale `rs/libmoq/native-libs/*.txt` breaks them and
# no cargo build. release-gate.yml's OBS filter can't list every such input;
# this diff-independent run catches what it misses, a day late.
- name: OBS
Expand All @@ -237,7 +237,7 @@ jobs:
# 60 to 90 s instead of about 8; the suite took 2 to 4.5 min locally.
- name: OBS TSan
recipe: obs test
- name: moq-c C fixtures
- name: libmoq C fixtures
recipe: rs c-tests

steps:
Expand Down Expand Up @@ -717,9 +717,9 @@ jobs:
contents: write
id-token: write

release-moq-c:
name: moq-c
uses: ./.github/workflows/moq-c.yml
release-libmoq:
name: libmoq
uses: ./.github/workflows/libmoq.yml
permissions:
contents: write

Expand Down Expand Up @@ -781,7 +781,7 @@ jobs:
sizes:
name: Shipping sizes
# Measures what these release jobs upload rather than rebuilding it.
needs: [release-py-ffi, release-shared-ffi, release-moq-c, release-moq-relay, release-moq-cli]
needs: [release-py-ffi, release-shared-ffi, release-libmoq, release-moq-relay, release-moq-cli]
runs-on: ubuntu-24.04-arm
# Hosted `main` jobs write the Rust cache; see .github/actions/rust-cache.
environment: ${{ github.ref == 'refs/heads/main' && 'cache-write' || '' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/obs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ name: OBS
# the moq-ffi API it is generated from, and the flake that supplies the
# toolchain, including uniffi-bindgen-cpp.
#
# moq-c's own C fixtures (`just rs c-tests`) run here too. They link libmoq.a
# libmoq's own C fixtures (`just rs c-tests`) run here too. They link libmoq.a
# from outside cargo the same way the plugin links moq-ffi, which is too slow
# for nextest's hang budget, so this job, which already does that kind of link,
# is where they gate release PRs. They also compile the C doc samples, hence
# `doc/lib/c/**` in the trigger.
#
# The manifests and Cargo.lock are in there for the one way a crate the plugin
# never names can break it: linking a Rust staticlib from outside cargo needs
# the native libraries in `rs/moq-c/native-libs/*.txt`, which moq-ffi and
# moq-c share and which are maintained by hand. A dependency that starts
# the native libraries in `rs/libmoq/native-libs/*.txt`, which moq-ffi and
# libmoq share and which are maintained by hand. A dependency that starts
# pulling in a new one leaves that list stale, and every Rust gate stays green,
# because cargo passes the flag itself and only this job links without it.
#
Expand Down Expand Up @@ -99,5 +99,5 @@ jobs:
- name: Build
run: nix develop .#obs --command just obs ci

- name: moq-c C fixtures
- name: libmoq C fixtures
run: nix develop .#obs --command just rs c-tests
3 changes: 1 addition & 2 deletions .github/workflows/release-c.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Release C

# Builds the moq C package (c/moq) for every target and publishes one archive per target to a
# c-v<version> GitHub release. moq-c-v* tags belong to the hand-written rs/moq-c crate until it
# retires.
# c-v<version> GitHub release. The hand-written rs/libmoq crate publishes under libmoq-v* tags.

on:
push:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- "rs/moq-ffi/**"
- ".cargo/config.toml"
- "sh/c/**"
- "rs/moq-c/native-libs/**"
- "rs/libmoq/native-libs/**"
- "cpp/moq/cmake/moq-ffi.cmake"
- "Cargo.lock"
- ".github/workflows/c.yml"
Expand All @@ -113,7 +113,7 @@ jobs:
- "rs/moq-ffi/**"
- ".cargo/config.toml"
- "sh/cpp/**"
- "rs/moq-c/native-libs/**"
- "rs/libmoq/native-libs/**"
- "doc/lib/cpp/**"
- "doc/lib/samples.sh"
- "Cargo.lock"
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- "sh/obs/**"
- "rs/moq-ffi/**"
- ".cargo/config.toml"
- "rs/moq-c/**"
- "rs/libmoq/**"
- "doc/lib/c/**"
- "doc/lib/samples.sh"
- "rs/**/Cargo.toml"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
tags:
- 'moq-relay-v*'
- 'moq-cli-v*'
- 'moq-c-v*'
- 'libmoq-v*'
- 'moq-gst-v*'

jobs:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
env:
REF_NAME: ${{ github.ref_name }}
run: |
re='^(moq-relay|moq-cli|moq-c|moq-gst)-v([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?)$'
re='^(moq-relay|moq-cli|libmoq|moq-gst)-v([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?)$'
if [[ ! "$REF_NAME" =~ $re ]]; then
echo "Tag format not recognized: $REF_NAME" >&2
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .oss-scanner/threat_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Most important, in this order:

`unsafe` is rare and worth reading closely where it appears: `rs/moq-quic`, `rs/moq-net/src/model`, `rs/moq-net/src/util/cell.rs`, `rs/moq-net/src/transport.rs`, and `rs/moq-relay/src/uring.rs`.

Out of scope: `js/` and the other language bindings (`py/`, `swift/`, `kt/`, `go/`, `dart/`, `cpp/`, `rs/moq-ffi`, `rs/moq-c`), capture and encode crates that read local devices (`moq-video`, `moq-v4l`, `moq-nvenc`, `moq-audio`, `moq-transcode`, `moq-gst`, `moq-boy`), `demo/`, `bench/`, `test/`, `infra/`, `doc/`, `drafts/`, and CI configuration. A flaw that lies wholly inside a dependency (quinn, rustls, aws-lc, tokio, hyper) belongs upstream unless our use of it makes it reachable.
Out of scope: `js/` and the other language bindings (`py/`, `swift/`, `kt/`, `go/`, `dart/`, `cpp/`, `rs/moq-ffi`, `rs/libmoq`), capture and encode crates that read local devices (`moq-video`, `moq-v4l`, `moq-nvenc`, `moq-audio`, `moq-transcode`, `moq-gst`, `moq-boy`), `demo/`, `bench/`, `test/`, `infra/`, `doc/`, `drafts/`, and CI configuration. A flaw that lies wholly inside a dependency (quinn, rustls, aws-lc, tokio, hyper) belongs upstream unless our use of it makes it reachable.

## How to exercise it

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"css.lint.unknownAtRules": "ignore",
"biome.lsp.bin": "./node_modules/.bin/biome",
"cmake.sourceDirectory": "./rs/moq-c"
"cmake.sourceDirectory": "./rs/libmoq"
}
47 changes: 20 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default-members = [
"rs/kio",
"rs/kio/macros",
"rs/hang",
# "rs/moq-c", # requires C toolchain
# "rs/libmoq", # requires C toolchain
"rs/moq-congestion",
"rs/moq-archive",
"rs/moq-auth",
Expand Down Expand Up @@ -180,7 +180,7 @@ moq-vaapi = { version = "0.2.1", path = "rs/moq-vaapi" }
# cross-compiled Python, Swift, Kotlin, and Go builds have no use for: adding
# `features = ["capture"]` to a consumer that ships in those bindings pulls the
# whole device graph into every one of them. Codec features are independent of
# that argument, so moq-ffi and moq-c opt NVIDIA and VAAPI back in (OpenH264
# that argument, so moq-ffi and libmoq opt NVIDIA and VAAPI back in (OpenH264
# through their own `openh264` feature, which release builds enable).
moq-video = { version = "0.1.10", path = "rs/moq-video", default-features = false }
moq-webrtc = { version = "0.3.12", path = "rs/moq-webrtc" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ Licensed under either:
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)

**Exception:** the OBS plugin under [`cpp/obs/`](cpp/obs) is licensed under **GPL-2.0-or-later** (see [`cpp/obs/LICENSE`](cpp/obs/LICENSE)), because it links OBS Studio's `libobs`, which is GPL-2.0. This is a separately-distributable work; per GPLv2 its presence in this repository is mere aggregation and does not affect the MIT/Apache licensing of the rest of the project. `moq-c` and the other moq crates remain MIT/Apache.
**Exception:** the OBS plugin under [`cpp/obs/`](cpp/obs) is licensed under **GPL-2.0-or-later** (see [`cpp/obs/LICENSE`](cpp/obs/LICENSE)), because it links OBS Studio's `libobs`, which is GPL-2.0. This is a separately-distributable work; per GPLv2 its presence in this repository is mere aggregation and does not affect the MIT/Apache licensing of the rest of the project. `libmoq` and the other moq crates remain MIT/Apache.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
After the `0.22.0` cut, which still waits on every break planned for it, each release cycle runs in three phases by kind of change, recorded as `phase` in `version.json`: `additive` work first, then `api` breaks, then `wire` changes.
An API break is what a published consumer adapts to when it rebuilds: the public Rust, JS, or bindings API, CLI flags, config keys, and environment variables.
A wire change is what a deployed peer adapts to without rebuilding: a frozen wire version, the hang catalog JSON, or a stored or exported container format.
The maintainer opens the next phase with a PR that changes `phase`. After the `0.22.0` cut, and after the wire cut that ends each cycle, a PR on `main` sets it to `additive` once the cut has merged into `release` and every package it bumps is published (crates.io, npm, and the `moq-c-v*`/`moq-ffi-v*` GitHub releases): the cut PR itself carries breaks, so its API diff must only report, and the API diff's baselines are those published versions, so an earlier reset fails Nightly's `--deny` on every break the cut shipped.
The maintainer opens the next phase with a PR that changes `phase`. After the `0.22.0` cut, and after the wire cut that ends each cycle, a PR on `main` sets it to `additive` once the cut has merged into `release` and every package it bumps is published (crates.io, npm, and the `libmoq-v*`/`moq-ffi-v*` GitHub releases): the cut PR itself carries breaks, so its API diff must only report, and the API diff's baselines are those published versions, so an earlier reset fails Nightly's `--deny` on every break the cut shipped.
`main` can be cut on demand in the additive and API phases; in the wire phase it is cut only once its wire version is final, so wire work comes last and stays short.
While `phase` is `additive`, Nightly runs `just api-diff --deny` on `main` and the cut PR's API diff denies too, so a break that lands early is reverted, or the maintainer opens the API phase.

Expand Down
19 changes: 3 additions & 16 deletions c/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Viewer ceilings and PROBE target overrides are refused with the new `MOQ_ERROR_O

Audio and video subscribe setup now reports `MOQ_ERROR_UNSUPPORTED_CONFIG` when the decoder refuses a codec, layout, or description, or when every video decoder for the codec reports that this device cannot decode the stream. Handle this variant to try another rendition instead of inspecting an audio/video error message or `Unsupported`. Decoder faults, such as a missing driver or no device, and later peer and decode failures keep their existing errors. Regenerate bindings and rebuild the matching native library together.

## moq-c 0.7, the hand-written ABI
## libmoq 0.6 -> 0.22

The hand-written crate never published as moq-c: a libmoq 0.6 user applies these entries before moving to the generated API.
The hand-written API's last line, which ships as libmoq 0.22: a libmoq 0.6 user applies these entries before moving to the generated API.

### Announcements are a listing ([#7678](https://github.com/moq-dev/moq/pull/7678))

Expand Down Expand Up @@ -187,7 +187,7 @@ Set `moq_client_config::quic_keylog` or `moq_server_config::quic_keylog` as well
### OpenH264 is a build feature (#5771)

The release archives and the CMake build still carry the software H.264 fallback.
A bare `cargo build -p moq-c` leaves it out; add `--features openh264` to keep it.
A bare `cargo build -p libmoq` leaves it out; add `--features openh264` to keep it.

### Subscriptions carry group ranges (#5732)

Expand Down Expand Up @@ -218,19 +218,6 @@ Free each handle with `moq_consume_close` once its successor arrives.
A frame write fails with a protocol error of kind `MOQ_PROTOCOL_KIND_TIMESTAMP_MISMATCH` when a group's first frame starts before a lower-sequence group's, or after a higher one's.
A publisher whose timeline restarts publishes a new broadcast instead.

### libmoq is moq-c (#4288)

The C bindings ship as the `moq-c` crate, starting at 0.7.0.
The header is still `moq.h` and the library is still `libmoq.a` / `moq.lib` (`-lmoq`); the C ABI did not change with the rename.
The CMake package, pkg-config name, release tags, and archives follow the new name.

| Before | After |
| --- | --- |
| `find_package(moq)`, target `moq` | `find_package(moq-c)`, target `moq::c` |
| `pkg-config --libs moq` | `pkg-config --libs moq-c` |
| nix `.#libmoq` | nix `.#moq-c` |
| tags `libmoq-v*`, archives `libmoq-<version>-<target>` | tags `moq-c-v*`, archives `moq-c-<version>-<target>` |

### Background panics are reported (#5562)

A panic in a background task reports `MOQ_ERROR_PANIC`, and other handles keep running.
Expand Down
2 changes: 1 addition & 1 deletion cpp/moq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endif()
# The bindings compile here at the including project's CMAKE_CXX_STANDARD (else the compiler's
# default, at least C++17) and with its flags. Only a target that links them builds them: the
# package ships the source, not this library.
# Named moq-cpp so an in-tree build can sit beside moq-c's `moq` target.
# Named moq-cpp so an in-tree build can sit beside libmoq's `moq` target.
add_library(moq-cpp STATIC EXCLUDE_FROM_ALL src/moq.cpp)
add_library(moq::cpp ALIAS moq-cpp)
add_dependencies(moq-cpp moq_ffi)
Expand Down
Loading