Skip to content

Commit 38eb847

Browse files
committed
crate-level docs
1 parent 71157ba commit 38eb847

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

webrtc/src/lib.rs

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,79 @@
11
#![warn(rust_2018_idioms)]
22
#![allow(dead_code)]
33

4+
//! # WebRTC Crate Overview
5+
//! The `webrtc` crate provides Rust-based bindings and high-level abstractions
6+
//! for WebRTC, based on the [W3C specification](https://www.w3.org/TR/webrtc/).
7+
//! Included is a set of communication protocols and APIs for building real-time
8+
//! communication (RTC) applications on top of the WebRTC standard.
9+
//!
10+
//! If you would like to learn more about WebRTC in general, the
11+
//! [WebRTC for the Curious](https://webrtcforthecurious.com/) book is a free
12+
//! resource that provides a great introduction to the topic.
13+
//!
14+
//! ## Features
15+
//! - Connections to remote peers using NAT-traversal technologies (STUN, TURN, and ICE)
16+
//! - Streaming of audio and video media via RTP and RTCP
17+
//! - Data channels for high performance, bi-directional communication
18+
//! - Secured communications via DTLS and SRTP
19+
//! - Multi-homing and congestion control using SCTP
20+
//! - Support for Multicast DNS (mDNS)
21+
//! - Interceptors for RTP, RTCP, and DataChannel packets
22+
//!
23+
//! ## Usage
24+
//! ...
25+
//!
26+
//! ## Key Concepts
27+
//!
28+
//! The WebRTC API, as defined by the W3C specification, is composed of a number of
29+
//! constructs and interfaces that provide a rich set of functionality, including
30+
//! (but not limited to):
31+
//! - connection establishment
32+
//! - media streaming
33+
//! - data transfer
34+
//! - error handling
35+
//! - congestion control
36+
//!
37+
//! The following section provides a brief overview of the key concepts and constructs
38+
//! that are used throughout the WebRTC API.
39+
//!
40+
//! ### RTCConfiguration
41+
//!
42+
//! The `RTCConfiguration` struct defines the set of parameters that are used to configure
43+
//! how peer-to-peer communication via `RTCPeerConnection` is established or re-established.
44+
//! This includes the set of ICE servers to use, the ICE transport policy, the bundle policy,
45+
//! the RTCP mux policy, the peer identity, and the set of certificates to use.
46+
//!
47+
//! Configurations may be reused across multiple connections, and are treated as read-only
48+
//! once constructed.
49+
//!
50+
//! ### RTCPeerConnection
51+
//!
52+
//! The `RTCPeerConnection` is the primary entry point to the WebRTC API. It represents an
53+
//! individual connection between a local device and a remote peer.
54+
//!
55+
//! ### MediaStream
56+
//!
57+
//! ### DataChannel
58+
//!
59+
//! ### RTCIceCandidate
60+
//!
61+
//! ### RTCSessionDescription
62+
//!
63+
//! ## Examples
64+
//! The `examples/` directory contains a range of examples, from basic peer connections to
65+
//! advanced data channel usage.
66+
//!
67+
//! ## Compatibility
68+
//! This crate aims to stay up-to-date with the latest W3C WebRTC specification. However,
69+
//! as WebRTC is a rapidly evolving standard, there might be minor discrepancies. Always
70+
//! refer to the official W3C WebRTC specification for authoritative information.
71+
//!
72+
//! ## License
73+
//! This project is licensed under either of the following, at your option:
74+
//! - [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
75+
//! - [MIT License](https://opensource.org/license/mit/)
76+
477
// re-export sub-crates
578
pub use {data, dtls, ice, interceptor, mdns, media, rtcp, rtp, sctp, sdp, srtp, stun, turn, util};
679

0 commit comments

Comments
 (0)