layer_mtproto/lib.rs
1// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4// NOTE:
5// The "Layer" project is no longer maintained or supported.
6// Its original purpose for personal SDK/APK experimentation and learning
7// has been fulfilled.
8//
9// Please use Ferogram instead:
10// https://github.com/ankit-chaubey/ferogram
11// Ferogram will receive future updates and development, although progress
12// may be slower.
13//
14// Ferogram is an async Telegram MTProto client library written in Rust.
15// Its implementation follows the behaviour of the official Telegram clients,
16// particularly Telegram Desktop and TDLib, and aims to provide a clean and
17// modern async interface for building Telegram clients and tools.
18
19#![cfg_attr(docsrs, feature(doc_cfg))]
20#![doc(html_root_url = "https://docs.rs/layer-mtproto/0.5.0")]
21//! MTProto session and transport abstractions.
22//!
23//! This crate handles:
24//! * Message framing (sequence numbers, message IDs)
25//! * Plaintext transport (for initial handshake / key exchange)
26//! * Encrypted transport skeleton (requires a crypto backend)
27//!
28//! It is intentionally transport-agnostic: bring your own TCP/WebSocket.
29
30#![deny(unsafe_code)]
31#![warn(missing_docs)]
32
33pub mod authentication;
34pub mod encrypted;
35pub mod message;
36pub mod session;
37pub mod transport;
38
39pub use authentication::{Finished, finish, step1, step2, step3};
40pub use encrypted::EncryptedSession;
41pub use message::{Message, MessageId};
42pub use session::Session;