ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - FedericoBruzzone/tdlib-rs: Rust wrapper around the Telegram Database Library 🦀
Rust wrapper around the Telegram Database Library 🦀 - FedericoBruzzone/tdlib-rs
Visit Site

GitHub - FedericoBruzzone/tdlib-rs: Rust wrapper around the Telegram Database Library 🦀

GitHub - FedericoBruzzone/tdlib-rs: Rust wrapper around the Telegram Database Library 🦀

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.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory