sew_lkproto/lib.rs
1//! LiveKit client protocol 17 for Sew's media engine.
2//!
3//! - [`livekit`] and [`logger`]: the protobuf types of `livekit_rtc.proto`,
4//! `livekit_models.proto`, `livekit_metrics.proto` and `logger/options.proto`, vendored
5//! byte-identical from `livekit/protocol` at [`PROTOCOL_COMMIT`] (`proto/`) and generated
6//! with prost + pbjson (binary and LiveKit's JSON, unknown JSON fields ignored) without
7//! `protoc` (protox builds the descriptors). Sew's own tests regenerate them and fail on
8//! drift.
9//! - [`Timestamp`]: `google.protobuf.Timestamp`, the type of the generated timestamp fields,
10//! with the protobuf JSON mapping's RFC 3339 strings.
11//! - [`version`]: Sew's protocol-version gates (rewritten from a written
12//! behaviour specification), with the gate table as data ([`version::GATES`]).
13//!
14//! The generated sources are `include!`d so `cargo fmt` leaves them alone; they carry no
15//! `unsafe`.
16
17mod timestamp;
18pub mod version;
19
20pub use timestamp::Timestamp;
21pub use version::{BelowFloor, CURRENT_PROTOCOL, MIN_CLIENT_PROTOCOL, ProtocolVersion};
22
23/// The `livekit/protocol` commit the protos come from (protocol 17).
24pub const PROTOCOL_COMMIT: &str = "a4f4b5c0c23f167d0c07de1e1d7652125882e73c";
25
26// SPDX-License-Identifier: Apache-2.0
27// Generated from livekit/protocol protobufs/livekit_rtc.proto, protobufs/livekit_models.proto, protobufs/livekit_metrics.proto, protobufs/logger/options.proto @ a4f4b5c (Apache-2.0, © 2023 LiveKit, Inc.).
28// Generated by scripts/media/gen-lkproto.sh; do not edit.
29
30/// Package `livekit` (generated; see the crate docs).
31#[allow(
32 clippy::all,
33 clippy::unwrap_used,
34 clippy::expect_used,
35 unreachable_pub,
36 missing_debug_implementations,
37 unused_qualifications,
38 rust_2018_idioms,
39 deprecated,
40 missing_docs
41)]
42pub mod livekit {
43 include!("gen/livekit.rs");
44 include!("gen/livekit.serde.rs");
45}
46
47/// Package `logger` (generated; see the crate docs).
48#[allow(
49 clippy::all,
50 clippy::unwrap_used,
51 clippy::expect_used,
52 unreachable_pub,
53 missing_debug_implementations,
54 unused_qualifications,
55 rust_2018_idioms,
56 deprecated,
57 missing_docs
58)]
59pub mod logger {
60 include!("gen/logger.rs");
61 include!("gen/logger.serde.rs");
62}
63
64/// README.md's examples, compiled and run as doc tests.
65#[cfg(doctest)]
66#[doc = include_str!("../README.md")]
67struct ReadmeExamples;