Comments (26)
We currently testing it in different environments. It is likely to be released till the end of the month.
from td.
Here you go: https://github.com/x2bool/tdsharp
from td.
Sorry for the delay. C# native bindings have been released as part of TDLib 1.2.0 release. See README for build instructions and usage example.
from td.
@Anonymphous, No. .NET Core 2.0 lacks support of using native C++-code directly, so TDLib can be used there only as a shared library. TDLib JSON interface is perfectly suitable for that usage, but intermediate conversion to/from JSON will be required.
from td.
@OleksiyMoroz You will not be able to use C++/CLI / C++/CX native TDLib interface with .Net Core, but you are able to use TDLib JSON interface.
It is also possible to generate converters between TDLib JSON objects and C# classes to simplify usage of JSON interface.
from td.
@OleksiyMoroz what is your use case?
I generated JSON API to C# bindings (.NET Standard 2.0) from this: https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl. I might consider opensourcing it if that would help anyone.
from td.
Hi! Thanks for C# bindings. I opened an issue about .NET Core support since it is now an important platform for many developers. And also because of the fact that JSON serialization/deserialization creates significant overhead.
from td.
@hadi77ir We haven't tried it, but I doubt that it will be able to generate bindings which will be more convenient or more efficient than TDLib JSON interface. Nevertheless, it would be interesting to see what can be generated using CppSharp.
from td.
So we will not ably to use TDLib with .net core 2 anyway?
from td.
I wrote a sample code in this commit, But I don't know it works fine in this way or not!
from td.
C# binding (will be released soon)
When? Is there any schedule?
from td.
@levlam Will it be compatible with .NET Core 2.0?
from td.
@levlam according to docs/standard/native-interop.md dotnet core supports P/Invoke if I'm not wrong isn't that the way people write bindings?
can you please elaborate on this? I want to know is the possibility to use TDLib in Linux using C#?
from td.
@alizx it's probably about C++/CLI support: https://github.com/dotnet/coreclr/issues/659
@levlam Will it be compatible with Mono?
from td.
P/Invoke is a very convenient way to call ะก code from a shared library from C#, but this is not enough to be able to pass C++ and C# objects between C and C# code. We will provide C++/CLI / C++/CX interface which provides a way to communicate with TDLib using C# objects, which isn't supported in .NET Core.
But TDLib anyway can be used through P/Invoke without any additional interface. TDLib JSON interface is created exactly for this purpose.
from td.
@x2bool It looks like Mono also doesn't support C++/CLI unless it is used under Windows (or unless Windows version of Mono is used using Wine).
from td.
There's CppSharp which helps in interoperability between C# and C++ libraries. As an example, QtSharp (C#/.NET bindings for Qt) is implemented with CppSharp.
from td.
@levlam Most likely, as you say. But this will need to be checked.
One thing I can say for sure at this time: cppsharp does not start with a pleasant.
https://github.com/mono/CppSharp/blob/master/docs/GettingStarted.md
Only one threshold of entry into it already speaks for itself.
from td.
Preston can. He also makes cycles very cool
from td.
@levlam Thank you! Seems need to work with JSON wrapper
from td.
The interruption of the Preston cycle was caused by ๐ถ
@levlam Thanks
from td.
@x2bool Show please how to do it. Your idea will help me better understand the essence.
from td.
@x2bool Do you have working examples usign JSON interface? Do you try to save media?
from td.
@x2bool How did you manage to do that? Is it possible to convert field names to snake case?
from td.
Do you mean CamelCase, because fields are already in snake_case?
P.S. let's move this discussion to my repo
from td.
Sorry, you are right, I mean CamelCase, it is more convenient in C#
from td.
Related Issues (20)
- Receiving messages is stopping intermittently HOT 10
- Receiving message history from several chats at once HOT 3
- tdlib Versionsnumber HOT 2
- Warning in test/http.cpp while compile HOT 1
- Account is cancelled HOT 1
- How to understand that this is a link to a bot? HOT 2
- Share phone number with bot HOT 2
- Separate message_ids in the same post HOT 3
- PHP code fails to compile: `Unsupported tl-schema version -1` HOT 10
- Unknown error in class "messageReplyToMessage" HOT 1
- "Request is empty" on authorization in Ubuntu HOT 4
- How do I launch the bot correctly? HOT 2
- Can someone show the references of the SetAuthenticationPhoneNumber() function HOT 3
- Telegram
- I need to build libtdjsonandroid to work on android using Unity (C#) HOT 1
- GetSupergroup return error "400 Invalid supergroup identifier" HOT 1
- Why I cannot create this json format to send text? HOT 8
- user-bot rate limit HOT 6
- Isn't there an instant way to change the hint password? HOT 3
- How to buy/subscribe to Telegram Business/Premium on Test DC? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from td.