Skip to main content

actr_protocol/
lib.rs

1#![allow(deprecated)]
2//! # Actor-RTC Protocol, Types, and URI Parsing
3//!
4//! This crate contains the unified protocol definitions for the Actor-RTC framework.
5//! Its primary role is to provide the raw, generated Protobuf types and essential,
6//! stateless utilities for handling those types (e.g., ID and URI formatting).
7//!
8//! It strictly adheres to its role as a data definition layer and does not contain
9//! higher-level traits, business logic, or runtime-specific implementations.
10
11/// Current schema version emitted by [`SignalingEnvelope`] writers.
12pub const SIGNALING_ENVELOPE_VERSION: u32 = 2;
13
14// Include generated protobuf code from prost
15pub mod generated {
16    pub mod actr {
17        include!(concat!(env!("OUT_DIR"), "/actr.rs"));
18    }
19    pub mod signaling {
20        include!(concat!(env!("OUT_DIR"), "/signaling.rs"));
21    }
22    pub mod webrtc {
23        include!(concat!(env!("OUT_DIR"), "/webrtc.rs"));
24    }
25}
26
27// Re-export all generated types at the crate root for convenience
28pub use generated::actr::*;
29pub use generated::signaling::*;
30pub use generated::webrtc::*;
31
32// Stateless, self-contained extensions and utilities
33pub mod actr_ext;
34pub mod error;
35pub mod manufacturer_auth;
36pub mod message;
37pub mod name;
38pub mod turn;
39pub mod uri;
40
41// Re-export key utilities for convenience
42pub use actr_ext::*;
43pub use error::*;
44pub use manufacturer_auth::*;
45pub use message::RpcRequest;
46pub use name::*;
47
48// Re-export prost and prost_types for downstream crates
49// This ensures a single source of truth for protobuf dependencies
50pub use prost;
51pub use prost_types;
52
53#[cfg(feature = "uniffi")]
54uniffi::setup_scaffolding!();