Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
- Group calls
- P2P calls
- Screen sharing
- Broadcast reception
All the power of NTgCalls with a Rust-native API.
Add to your project
[]
= ">= 0.1.0"
Requires curl and unzip at build time to download the prebuilt NTgCalls
library. Works on Linux x86_64, Linux aarch64 (including Termux), Windows x86_64,
and macOS aarch64. See docs/build.md for details.
Usage
use ;
let tg = try_new?;
// get params JSON for phone.joinGroupCall
let params = tg.create?;
// after Telegram returns the transport JSON
tg.connect?;
tg.set_stream_sources?;
tg.stop?;
For P2P calls, see docs/p2p-flow.md.
Version compatibility
TgCalls::try_new() checks that the loaded NTgCalls shared library matches the
version this crate was built against. It returns an error if they don't match,
catching layout mismatches before they cause wrong behavior at runtime.
Docs
Read these in order for the full picture:
docs/architecture.md- crate layout and how the pieces fit togetherdocs/build.md- platform requirements and env varsdocs/p2p-flow.md- P2P call flow step by stepdocs/upgrade.md- how to upgrade ntgcalls
Run cargo doc --open for the full API reference.
Contributing
Issues and PRs are welcome. If you're adding support for a new ntgcalls feature,
read docs/upgrade.md first. It covers how bindings are generated and what
needs to change together.
License
MIT or Apache 2.0, at your option.