Skip to content

librtmp2 0.17.3

Choose a tag to compare

@github-actions github-actions released this 23 Nov 01:32

Added

  • Complete rustdoc coverage. Every public module, type, field, variant, method
    and constant is documented, and every one of the items the docs.rs coverage
    counter looks at now has a runnable example: 946/946 items documented and
    408/408 with examples, measured with the same rustdoc counter docs.rs uses
    (0.17.2 reported 605/946 and 2/406). The counters are reproducible locally
    with scripts/doc-coverage.sh.
  • A rewritten crate-level documentation page: what the library does and does
    not do, the Cargo feature table, a module map, working server and client
    examples, the error-handling contract and the threading model.
  • Documentation CI gates, covering gaps the existing steps missed:
    RUSTFLAGS="-D missing_docs" for both feature configurations,
    broken-intra-doc-link failures via RUSTDOCFLAGS="-D warnings",
    cargo test --doc for both feature sets, and scripts/doc-coverage.sh.

Fixed

  • Documentation that contradicted the implementation. Writing executable
    examples surfaced these:
    • amf3::read_double and read_integer do not consume the type marker while
      their writers emit one, so a naive write/read round trip reads the marker as
      data. The asymmetry is now documented.
    • Conn::handle_command ignores a payload whose command name cannot be read
      and returns Ok, so a peer sending an extension command cannot break the
      session. It previously claimed to report an error.
    • session::stream::publish_begin/play_begin only set the role flag; the
      stream name is recorded by their session::publish/session::play
      counterparts.
    • bytes::hton16/hton32 already byte-swap, so serializing them with
      to_be_bytes() converts twice; to_ne_bytes() is the correct pairing.
    • Wire-format details: the E-RTMP multitrack descriptor is two AMF0 values (a
      Number then a String), the FourCC list is a UI32 count followed by
      UI16-length entries, capsEx is two UI32 masks with an implied version, and
      a User Control PingRequest payload is six bytes so the token arrives as
      param1.
    • Conn::inject_relay_frame requires an app name and a resolvable route key,
      Conn::relay_route_key prefers a pinned relay_key, and
      ChunkRegistry::reset_stream clears state in place rather than freeing the
      slot.
  • The generated C header no longer carries Rust-only markdown. Intra-doc links,
    # Safety/# Errors/# Examples section markers and whole fenced blocks of
    Rust code are rewritten to plain prose by scripts/fix-header-docs.py, run
    from scripts/generate-header.sh. The header is 429 lines shorter and still
    compiles under cc -Wall -Wextra -Werror.

Notes

  • Documentation and CI only. No public signature, ABI, export name, dependency
    or runtime behaviour changed; the ABI checks report the same surface as
    0.17.2.

Benchmarks

Measured automatically for this release on a CI runner; the machine is described below. Raw data: bench-results-v0.17.3.json.

  • Measured: 2026-11-23 01:33:47 UTC · f129581 · crate version 0.17.3 · workflow run
  • CPU: AMD EPYC 7763 64-Core Processor · 4 vCPUs
  • RAM: 15.6 GiB
  • System: Linux 7.0.0-1020-azure x86_64 · rustc 1.100.0 · GitHub-hosted ubuntu26 (image 20261116.202.1)
  • Noise: shared CI VM — CPU model, neighbouring load and the runner image change between runs, so treat absolute numbers as indicative.
  • Comparable vs release v0.17.2: ✅ same CPU model, vCPU count, rustc and runner image; shared-VM noise of a few percent remains

protocol

Benchmark Time Throughput vs release v0.17.2
amf0_build_connect 208 ns — ⚪ −1.6 %
chunk/write_read_roundtrip 5.29 µs ~739 MiB/s ⚪ −0.6 %
flv/audio_tag_aac 1.27 ns — ⚪ +1.7 %
flv/video_tag_h264 1.25 ns — ⚪ +0.5 %
fourcc_to_video_codec_avc1 2.49 ns — 🟢 −11.1 %
server_read_c1 966 ns — ⚪ +3.3 %

relay

Benchmark Time Throughput vs release v0.17.2
relay/publish_to_player/100 51.3 ms ~1948 elem/s ⚪ −0.1 %
relay/publish_to_player/500 53.7 ms ~9319 elem/s ⚪ +0.4 %

🟢 faster · 🔴 slower · ⚪ within the noise band (5–25 % depending on how comparable the two environments are, plus both runs' Criterion confidence intervals). Lower time is better.