Closed isopen closed 5 years ago
The library has a minimum number of dependencies and supposed to be easily built on any of the supported architectures. There are too many supported operating systems, platforms and compilers to prebuilt all usable variants. We provide for now only prebuilt shared library for Android with corresponding Java interface, which is documented via Javadoc, because it is slightly harder to build the library for Java and Android.
TDLib can be used virtually from any modern programming language including Javascript. Moreover TDLib JSON interface can be treated as a native interface for Javascript. For Node.JS the usage of library is mostly the same as from Python: you just need to load tdjson shared library. To use TDLib in browsers you need to compile it using Emscripten compiler. It is harder to use TDLib from browsers because of sandboxing, so we will publish our browser Javascript wrapper later.
What do you mean by "where can test the build"?
Suppose we have built an application using tdlib. Then it is necessary to check the correctness of displaying information in the lists and other interface elements. I think this is allowed by a "mega-bot" on a specific phone number in one of the data centers. But here I can be wrong. I do not know the architecture on the backend. In one of the competitions on tdlib there was something like this. "It looks like it's gone". Now testing applications with such a crazy speed is unrealistic on the bare channel. I would like it to come to life :)
You can use my lib on node js https://github.com/k-egor-smirnov/node-tg-native
Sorry, but there is no such mega-bot. It was a usual user account and it is now unavailable, because someone has tested deletion of all chats. You can test everything using self-created accounts in the test DC.
Alexey, I would say, at the moment there are too many problems for the average user of the library. It is completely unclear what for it is needed without a backend (if only for the soul).
@k-egor-smirnov thanks, but that's not what I need 👍 node -v v8.9.1
But I think, if you send this thing to the heart of all sorts of angular, reactjs, it can make it easier for people to organize their communication systems. The truth is that the infa will be in the cloud somewhere.(there is a need for a cloud-based message viewer and other features) A little humor :) "Scientists have created a preporat, which allows you to lose weight without dieting" But the implementation of the interface will still be difficult. Too many features..
Thanks for the tips The library code is cool! Regards
@isopen i took an mistake when wrote that my module is incompatible with node.js >=7. You can run module with node.js < 9 due the bug in ffi module https://github.com/node-ffi/node-ffi/pull/439
@k-egor-smirnov "ffi" module doesn't compile on node <= 9 (see https://github.com/node-ffi/node-ffi/pull/439) node -v v8.9.1 I'll try a little later :)
@k-egor-smirnov tried :)
I do not know where to write this. I'll leave it here.)
My OpenSSL 1.1.0f 25 May 2017
nodejs index.js
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'libssl.so.1.0.0'
at Object.fs.openSync (fs.js:646:18)
at fs.readFileSync (fs.js:551:33)
at new DynamicLibrary (/home/mrmakss/prog/tdlib/npm/node_modules/ffi/lib/dynamic_library.js:67:21)
at Object.Library (/home/mrmakss/prog/tdlib/npm/node_modules/ffi/lib/library.js:45:12)
at Object.<anonymous> (/home/mrmakss/prog/tdlib/npm/node_modules/node-tg-native/lib/TD.js:15:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
Then the next bike starts, which I will not do ;)
@isopen Can you open issue in my repository with information about your system and close this thread?
@k-egor-smirnov More information about the system can be found on this site. https://www.debian.org/index.en.html
There is probably not even a problem in the system. Just asks tsl1.0.0 By the way trying to solve this problem, I lost one virtual machine. In a certain year there were disturbing news about version 1.0.0
You can add this yourself to your repository and ask @levlam about when this report will be closed.
@isopen https://github.com/nodegin/tglib is working with latest node version.
@seiya-git Thanks. But that's not what I need. Too much dependence on third-party module ffi-napi. If @levlam will include your source code in the examples, then I will take great pleasure in using it.
So back to this report. He alone can replace everything. @levlam of all this is really lacking and no one seems to want to really help, except @isopen What is the use of these gross interfaces on top, if there is no implementation for javascript.
@levlam In which patch can I build it myself for android? According to instructions
Very cool work!
But...I do not have time to build a library through cmake and view the required dependencies(i'am sorry). The documentation is good, but there are few practical examples of applying methods and necessary chains of methods. There are a lot of methods.
I have a few questions