Closed nuxeh closed 4 years ago
@nuxeh Thanks for your issue, It's a great idea. can your create a pull request to implement this idea? don't worry, if you cannot submit now, maybe the next version I will use your idea.
If you will create a pull request, I need tell you, DON'T CHANGE THIS REPOSITORY, this repository is generated by another project fantasy.
It looks like it uses cmake
so potentially it might work, since there's a support crate for that. And yes, this is something I could have a look at. I still need to grok how these crates fit together, with the fantasy crate you mention.
Actually what I could do is have a look at making a tdlib-sys
crate, and then I imagine this crate could depend on that to get the linkage.
Yes, of course, don't need change fantasy project, you can create tdlib-sys
crate, move rtdlib/tdjson.rs to your project, and then the rtdlib/fantasy project not generate this file, add your tdlib-sys
to dependencies.
When you complete your proejct, please pin me, then I change my code. Thanks
I create a new crate in there https://github.com/fewensa/tdlib-sys
Hi @fewensa , I have put a sys crate together, https://github.com/nuxeh/tdlib-sys.
Builds on Linux and OSX, but Windows is still WIP. It currently statically links TDlib at its master. I still haven't had a look at how this crate is currently integrated, but hoping you should have a better idea!
@nuxeh Thanks for your create this crate, The next commit I will do some test and change rtdlib to dependence your crate. during this period, you can try to solve the problem of Windows compilation failure.
And the API of tdlibjson should not change for a long period of time, so you don’t need to follow the td release version in real time. Using the current master version should have no effect
I'm sorry for you, now the rtdlib is use rtdlib-sys, not use yours.
https://github.com/fewensa/rtdlib/commit/7ea7d7a29c2654262a420fe559fbc3772a42f5b3
?
Sorry, because your project is not suitable for the current rtdlib dependencies, complex and long compilation process, and also includes dependencies of other libraries. This is not needed
What extra dependencies? Most of them should be build dependencies only, and there's no way to avoid that when building and linking using cargo.
Having to build manually and copying compiled objects is a fairly poor solution, when compared with doing it with Cargo.
Assuming you mean Rust dependencies. Otherwise, if it inadvertently links unnecessary C dependencies, this is certainly something that can be discussed/fixed, the sys
crate build I wrote was only a first pass.
So, If I create a pr, change your code like to rtdlib-sys can you accept? Because in the rtdlib project, I only want a simple library to call td jsonlib.
Of course, I would be more than happy to review any changes you have
Hi,
Is there any chance of td being built and linked internally as part of the crate build, as is the case with most standard
*-sys
crates?Thanks!