[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70564":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},70564,"td","tdlib\u002Ftd","tdlib","Cross-platform library for building Telegram clients",null,"https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd","C++",8844,2070,385,55,0,14,28,84,42,105.35,false,"main",[25,26,27],"telegram","cross-platform","library","2026-06-12 04:00:56","# TDLib\n\nTDLib (Telegram Database library) is a cross-platform library for building [Telegram](https:\u002F\u002Ftelegram.org) clients. It can be easily used from almost any programming language.\n\n## Table of Contents\n- [Features](#features)\n- [Examples and documentation](#usage)\n- [Dependencies](#dependencies)\n- [Building](#building)\n- [Using in CMake C++ projects](#using-cxx)\n- [Using in Java projects](#using-java)\n- [Using in .NET projects](#using-dotnet)\n- [Using with other programming languages](#using-json)\n- [License](#license)\n\n\u003Ca name=\"features\">\u003C\u002Fa>\n## Features\n\n`TDLib` has many advantages. Notably `TDLib` is:\n\n* **Cross-platform**: `TDLib` can be used on Android, iOS, Windows, macOS, Linux, FreeBSD, OpenBSD, NetBSD, illumos, Windows Phone, WebAssembly, watchOS, tvOS, visionOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort.\n* **Multilanguage**: `TDLib` can be easily used with any programming language that is able to execute C functions. Additionally, it already has native Java (using `JNI`) bindings and .NET (using `C++\u002FCLI` and `C++\u002FCX`) bindings.\n* **Easy to use**: `TDLib` takes care of all network implementation details, encryption and local data storage.\n* **High-performance**: in the [Telegram Bot API](https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi), each `TDLib` instance handles more than 37000 active bots simultaneously.\n* **Well-documented**: all `TDLib` API methods and public interfaces are fully documented.\n* **Consistent**: `TDLib` guarantees that all updates are delivered in the right order.\n* **Reliable**: `TDLib` remains stable on slow and unreliable Internet connections.\n* **Secure**: all local data is encrypted using a user-provided encryption key.\n* **Fully-asynchronous**: requests to `TDLib` don't block each other or anything else, responses are sent when they are available.\n\n\u003Ca name=\"usage\">\u003C\u002Fa>\n## Examples and documentation\nSee our [Getting Started](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fgetting-started) tutorial for a description of basic TDLib concepts.\n\nTake a look at our [examples](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Fblob\u002Fmaster\u002Fexample\u002FREADME.md#tdlib-usage-and-build-examples).\n\nSee a [TDLib build instructions generator](https:\u002F\u002Ftdlib.github.io\u002Ftd\u002Fbuild.html) for detailed instructions on how to build TDLib.\n\nSee description of our [JSON](#using-json), [C++](#using-cxx), [Java](#using-java) and [.NET](#using-dotnet) interfaces.\n\nSee the [td_api.tl](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Fblob\u002Fmaster\u002Ftd\u002Fgenerate\u002Fscheme\u002Ftd_api.tl) scheme or the automatically generated [HTML documentation](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Ftd__api_8h.html)\nfor a list of all available `TDLib` [methods](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Fclasstd_1_1td__api_1_1_function.html) and [classes](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Fclasstd_1_1td__api_1_1_object.html).\n\n\u003Ca name=\"dependencies\">\u003C\u002Fa>\n## Dependencies\n`TDLib` depends on:\n\n* C++17 compatible compiler (Clang 5.0+, GCC 7.0+, MSVC 19.1+ (Visual Studio 2017.7+), Intel C++ Compiler 19+)\n* OpenSSL\n* zlib\n* gperf (build only)\n* CMake (3.10+, build only)\n* PHP (optional, for documentation generation)\n\n\u003Ca name=\"building\">\u003C\u002Fa>\n## Building\n\nThe simplest way to build `TDLib` is to use our [TDLib build instructions generator](https:\u002F\u002Ftdlib.github.io\u002Ftd\u002Fbuild.html).\nYou need only to choose your programming language and target operating system to receive complete build instructions.\n\nIn general, you need to install all `TDLib` [dependencies](#dependencies), enter directory containing `TDLib` sources and compile them using CMake:\n\n```\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build .\n```\n\nTo build `TDLib` on low memory devices you can run [SplitSource.php](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Fblob\u002Fmaster\u002FSplitSource.php) script\nbefore compiling `TDLib` source code and compile only needed targets:\n```\nphp SplitSource.php\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build . --target tdjson\ncmake --build . --target tdjson_static\ncd ..\nphp SplitSource.php --undo\n```\nIn our tests clang 6.0 with libc++ required less than 500 MB of RAM per file and GCC 4.9\u002F6.3 used less than 1 GB of RAM per file.\n\n\u003Ca name=\"using-cxx\">\u003C\u002Fa>\n## Using in CMake C++ projects\nFor C++ projects that use CMake, the best approach is to build `TDLib` as part of your project or to install it system-wide.\n\nThere are several libraries that you could use in your CMake project:\n\n* Td::TdJson, Td::TdJsonStatic — dynamic and static version of a JSON interface. This has a simple C interface, so it can be easily used with any programming language that is able to execute C functions.\n  See [td_json_client](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Ftd__json__client_8h.html) documentation for more information.\n* Td::TdStatic — static library with C++ interface for general usage.\n  See [ClientManager](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Fclasstd_1_1_client_manager.html) and [Client](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Fclasstd_1_1_client.html) documentation for more information.\n\nFor example, part of your CMakeLists.txt may look like this:\n```\nadd_subdirectory(td)\ntarget_link_libraries(YourTarget PRIVATE Td::TdStatic)\n```\n\nOr you could install `TDLib` and then reference it in your CMakeLists.txt like this:\n```\nfind_package(Td 1.8.64 REQUIRED)\ntarget_link_libraries(YourTarget PRIVATE Td::TdStatic)\n```\nSee [example\u002Fcpp\u002FCMakeLists.txt](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Fblob\u002Fmaster\u002Fexample\u002Fcpp\u002FCMakeLists.txt).\n\n\u003Ca name=\"using-java\">\u003C\u002Fa>\n## Using in Java projects\n`TDLib` provides native Java interface through JNI. To enable it, specify option `-DTD_ENABLE_JNI=ON` to CMake.\n\nSee [example\u002Fjava](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Ftree\u002Fmaster\u002Fexample\u002Fjava) for example of using `TDLib` from Java and detailed build and usage instructions.\n\n\u003Ca name=\"using-dotnet\">\u003C\u002Fa>\n## Using in .NET projects\n`TDLib` provides native .NET interface through `C++\u002FCLI` and `C++\u002FCX`. To enable it, specify option `-DTD_ENABLE_DOTNET=ON` or `-DTD_ENABLE_DOTNET=CX` respectively to CMake.\n.NET Core supports `C++\u002FCLI` only since version 3.1 and only on Windows, so if older .NET Core is used or portability is needed, then `TDLib` JSON interface should be used through P\u002FInvoke instead.\n\nSee [example\u002Fcsharp](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Ftree\u002Fmaster\u002Fexample\u002Fcsharp) for example of using `TDLib` from C# and detailed build and usage instructions.\nSee [example\u002Fuwp](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Ftree\u002Fmaster\u002Fexample\u002Fuwp) for example of using `TDLib` from C# UWP application and detailed build and usage instructions for Visual Studio Extension \"TDLib for Universal Windows Platform\".\n\nWhen `TDLib` is built with `TD_ENABLE_DOTNET` option enabled, `C++` documentation is removed from some files. You need to checkout these files to return `C++` documentation back:\n```\ngit checkout td\u002Ftelegram\u002FClient.h td\u002Ftelegram\u002FLog.h td\u002Ftl\u002FTlObject.h\n```\n\n\u003Ca name=\"using-json\">\u003C\u002Fa>\n## Using from other programming languages\n`TDLib` provides efficient native C++, Java, and .NET interfaces.\nBut for most use cases we suggest to use the JSON interface, which can be easily used with any programming language that is able to execute C functions.\nSee [td_json_client](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Ftd__json__client_8h.html) documentation for detailed JSON interface description,\nthe [td_api.tl](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Fblob\u002Fmaster\u002Ftd\u002Fgenerate\u002Fscheme\u002Ftd_api.tl) scheme or the automatically generated [HTML documentation](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Ftd__api_8h.html) for a list of\nall available `TDLib` [methods](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Fclasstd_1_1td__api_1_1_function.html) and [classes](https:\u002F\u002Fcore.telegram.org\u002Ftdlib\u002Fdocs\u002Fclasstd_1_1td__api_1_1_object.html).\n\n`TDLib` JSON interface adheres to semantic versioning and versions with the same major version number are binary and backward compatible, but the underlying `TDLib` API can be different for different minor and even patch versions.\nIf you need to support different `TDLib` versions, then you can use a value of the `version` option to find exact `TDLib` version to use appropriate API methods.\n\nSee [example\u002Fpython\u002Ftdjson_example.py](https:\u002F\u002Fgithub.com\u002Ftdlib\u002Ftd\u002Fblob\u002Fmaster\u002Fexample\u002Fpython\u002Ftdjson_example.py) for an example of such usage.\n\n\u003Ca name=\"license\">\u003C\u002Fa>\n## License\n`TDLib` is licensed under the terms of the Boost Software License. See [LICENSE_1_0.txt](http:\u002F\u002Fwww.boost.org\u002FLICENSE_1_0.txt) for more information.\n","TDLib 是一个用于构建跨平台Telegram客户端的库。它使用C++编写，支持从几乎任何编程语言轻松调用，并且已经为Java和.NET提供了原生绑定。TDLib负责处理所有网络实现细节、加密以及本地数据存储，确保了开发过程的简便性。该库具有高性能特点，单个实例能够同时处理超过37000个活跃机器人。此外，TDLib还保证了消息更新的一致性和顺序性，在不稳定或慢速网络条件下也能保持稳定运行。所有本地数据均使用用户提供的密钥进行加密，进一步增强了安全性。由于其跨平台特性（支持Android、iOS、Windows等多种操作系统），TDLib非常适合需要在不同设备上提供一致体验的Telegram应用开发场景。",2,"2026-06-11 03:32:47","trending"]