telegram api 可以说是tdlib的接口,tdlib是telegram客户端的跨平台的异步库(https://github.com/tdlib/td)。根据构建说明 https://tdlib.github.io/td/build.html?language=Go 构建自己要使用的平台的二进制文件。
//mac构建二进制说明xcode-select --install/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" //安装brew 已安装的可以滤过brew install gperf cmake openssl //安装c库构建依赖git clone https://github.com/tdlib/td.gitcd tdrm -rf buildmkdir buildcd buildcmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. //安装到/usr/localcmake --build . --target install // 编译并安装