Logo

0x3d.Site

is designed for aggregating information.
Welcome
check repository here

tdlib-rs

Latest version Documentation CI Linux CI Windows CI macOS downloads license

A Rust wrapper around the Telegram Database library. It includes a generator to automatically generate the types and functions from the TDLib's Type Language file.

Why this fork?

This is an improved version of the tdlib-rs library, with the following additional features:

  1. It is cross-platform, it works on Windows, Linux and MacOS.
  2. Not required tdlib to be compiled and installed on the system.
  3. Not required pkg-config to build the library and associated exported variables.
  4. Three different ways to build the library:
    • download-tdlib: download the precompiled library from the GitHub releases.
    • local-tdlib: use the tdlib installed on the system.
    • pkg-config: use the pkg-config to build the library.
  5. It is possible to download the tdlib library from the GitHub releases.

Information

We provide a precompiled version of the library for the supported platforms:

  • Linux (x86_64)
  • Windows (x86_64)
  • macOS Intel (x86_64)
  • macOS Apple Silicon (arm64)

We compile it in the CI and we upload the artifacts to the GitHub releases, so we can download it and use to build this library.

It's mainly created for using it in the tgt client, but it should work also for any other Rust project.

Current supported TDLib version: 1.8.29.

Cargo features

Please see the documentation of the module build for more information about the features here. It functions that you can use to build the library in different ways.

download-tdlib

If you don't want to compile and intall the tdlib on your system manually, you should enable the download-tdlib feature in the Cargo.toml file:

[dependencies]
tdlib = { version = "...", features = [ "download-tdlib" ] }

[build-dependencies]
tdlib = { version = "...", features = [ "download-tdlib" ] }
// build.rs
fn main() {
    tdlib_rs::build::build(None);
}

local-tdlib

local-tdlib require you to have the tdlib (version 1.8.29) compiled and installed on your system, and the following variables exported, for example in the .bashrc file:

# The path to the tdlib folder
export LOCAL_TDLIB_PATH=$HOME/lib/tdlib

Then you can enable the local-tdlib feature in the Cargo.toml file:

[dependencies]
tdlib = { version = "...", features = [ "local-tdlib" ] }

[build-dependencies]
tdlib = { version = "...", features = [ "local-tdlib" ] }
// build.rs
fn main() {
    tdlib_rs::build::build(None);
}

pkg-config

If you want to use the pkg-config to build this library, you should enable the pkg-config feature in the Cargo.toml file:

[dependencies]
tdlib = { version = "...", features = [ "pkg-config" ] }

[build-dependencies]
tdlib = { version = "...", features = [ "pkg-config" ] }
// build.rs
fn main() {
    tdlib_rs::build::build(None);
}

remember to have the tdlib (version 1.8.29) compiled on your system, and the following variables exported, for example in the .bashrc file:

# pkg-config configuration
export PKG_CONFIG_PATH=$HOME/lib/tdlib/lib/pkgconfig/:$PKG_CONFIG_PATH

# dynmic linker configuration
export LD_LIBRARY_PATH=$HOME/lib/tdlib/lib/:$LD_LIBRARY_PATH

docs

This feature skip the linking of the library and only generate the code of generated.rs. Is used only for testing.

bots-only-api

This feature enable the generation of the functions only used by Telegram bots.

License

This repository are licensed under either of

at your option.

Please review the license file provided in the repository for more information regarding the terms and conditions of the license.

Contact

If you have any questions, suggestions, or feedback, do not hesitate to contact me.

Mantainers:

Credits

  • grammers: the tdlib-tl-gen and tdlib-tl-parser projects are forks of the grammers-tl-gen and grammers-tl-parser projects.
  • rust-tdlib: for inspiration about some client code.
  • tdlib-rs: for inspiration about the generator code.
Rust
Rust
Rust is a modern programming language focused on safety, speed, and concurrency. It prevents common bugs like null pointer dereferencing and data races, making it ideal for system programming and high-performance applications.
Create business apps like assembling blocks | ILLA Cloud
Create business apps like assembling blocks | ILLA Cloud
GitHub - 0x59616e/SteinsOS: An operating system written in Rust
GitHub - 0x59616e/SteinsOS: An operating system written in Rust
GitHub - j0ru/kickoff: Minimalistic program launcher
GitHub - j0ru/kickoff: Minimalistic program launcher
Workflow runs · rust-lang/rustup
Workflow runs · rust-lang/rustup
GitHub - paradigmxyz/artemis: A simple, modular, and fast framework for writing MEV bots in Rust.
GitHub - paradigmxyz/artemis: A simple, modular, and fast framework for writing MEV bots in Rust.
Workflow runs · sigp/lighthouse
Workflow runs · sigp/lighthouse
GitHub - flox/flox: Developer environments you can take with you
GitHub - flox/flox: Developer environments you can take with you
Unified Architecture - OPC Foundation
Unified Architecture - OPC Foundation
MaidSafe
MaidSafe
ttyperacer / terminal-typeracer · GitLab
ttyperacer / terminal-typeracer · GitLab
GitHub - cloudhead/rx: 👾 Modern and minimalist pixel editor
GitHub - cloudhead/rx: 👾 Modern and minimalist pixel editor
GitHub - rust-ethereum/ethabi: Encode and decode smart contract invocations
GitHub - rust-ethereum/ethabi: Encode and decode smart contract invocations
GitHub - watchexec/watchexec: Executes commands in response to file modifications
GitHub - watchexec/watchexec: Executes commands in response to file modifications
GitHub - osa1/tiny: A terminal IRC client
GitHub - osa1/tiny: A terminal IRC client
GitHub - sergree/whatbpm: 💓 Today's Trending Values for EDM Production
GitHub - sergree/whatbpm: 💓 Today's Trending Values for EDM Production
GitHub - rsaarelm/magog: A roguelike game in Rust
GitHub - rsaarelm/magog: A roguelike game in Rust
GitHub - autonomys/subspace: Subspace Network reference implementation
GitHub - autonomys/subspace: Subspace Network reference implementation
GitHub - nicohman/eidolon: Provides a single TUI-based registry for drm-free, wine and steam games on linux, accessed through a rofi launch menu.
GitHub - nicohman/eidolon: Provides a single TUI-based registry for drm-free, wine and steam games on linux, accessed through a rofi launch menu.
GitHub - shshemi/tabiew: A lightweight, terminal-based application to view and query delimiter separated value formatted documents, such as CSV or TSV files.
GitHub - shshemi/tabiew: A lightweight, terminal-based application to view and query delimiter separated value formatted documents, such as CSV or TSV files.
GitHub - joamag/boytacean: A GB emulator that is written in Rust 🦀!
GitHub - joamag/boytacean: A GB emulator that is written in Rust 🦀!
GitHub - chaosprint/glicol: Graph-oriented live coding language and music/audio DSP library written in Rust
GitHub - chaosprint/glicol: Graph-oriented live coding language and music/audio DSP library written in Rust
GitHub - wasmerio/winterjs: Winter is coming... ❄️
GitHub - wasmerio/winterjs: Winter is coming... ❄️
GitHub - withoutboats/notty: A new kind of terminal
GitHub - withoutboats/notty: A new kind of terminal
GitHub - cfal/shoes: A multi-protocol proxy server written in Rust (HTTP, HTTPS, SOCKS5, Vmess, Vless, Shadowsocks, Trojan, Snell)
GitHub - cfal/shoes: A multi-protocol proxy server written in Rust (HTTP, HTTPS, SOCKS5, Vmess, Vless, Shadowsocks, Trojan, Snell)
GitHub - eigerco/beerus: A stateless trustless Starknet light client in Rust 🦀
GitHub - eigerco/beerus: A stateless trustless Starknet light client in Rust 🦀
GitHub - quilt/etk: evm toolkit
GitHub - quilt/etk: evm toolkit
GitHub - pop-os/system76-power: System76 Power Management
GitHub - pop-os/system76-power: System76 Power Management
GitHub - Limeth/ethaddrgen: Custom Ethereum vanity address generator made in Rust
GitHub - Limeth/ethaddrgen: Custom Ethereum vanity address generator made in Rust
The Tor Project / Core / Arti · GitLab
The Tor Project / Core / Arti · GitLab
Production
Production
Rust
More on Rust

Programming Tips & Tricks

Code smarter, not harder—insider tips and tricks for developers.

Error Solutions

Turn frustration into progress—fix errors faster than ever.

Shortcuts

The art of speed—shortcuts to supercharge your workflow.
  1. Collections 😎
  2. Frequently Asked Question's 🤯

Tools

available to use.

Made with ❤️

to provide resources in various ares.