Please follow the steps described in the tdlib-sys repo to setup FFI bindings generation.
Add tdjson to your Cargo.toml dependency list toml tdjson = "0.2"
tdjson
Cargo.toml
toml tdjson = "0.2"
And let the Cargo do it's magic! bash cargo build
bash cargo build